Author Topic: Receiving "communication Error 1" when trying to use the Arduino Sketch  (Read 26951 times)

Thomas

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Anyone got this work with the listed Arduino Sketch (code)?

I use a Arduino Nano to my Bernardo KF 20 L Super which is the same machine like a sx2 (just another label)

But I only get displayed the error message from the code : "communication Error 1 ".  :-[

Thomas

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Receiving "communication Error 1" when trying to use the Arduino Sketch
« Reply #1 on: January 31, 2015, 02:57:40 PM »
Hi Thomas,

Starting in January 2015 I have had 3 individuals report their tachometer reports "0000" regardless of where it is set (side note: the tachometer kit code is different than the posted Arduino code.. I improved upon it). All three of these individuals had SX2P mills

One of these individuals was kind enough to connect an arduino with the posted arduino test code to allow me to view what the samples looked like. Unfortunately it seems as if Sieg industries has completely changed their protocol!

I am confident that I will be able to make updates to make the arduino code and my tachometer kits work but in order to do this I really need someone to probe the units with a logic analyzer and provide me with the dump of that. Do you happen to own one?

While a significantly greater hassle, this should be possible to diagnose on an Arduino too with a sufficient number of samples. Currently I'm not sure if the size of each "frame" has increased in side and consequently led to me not seeing the whole picture.

I would be happy to walk you through these processes if you are interested in helping. I do have someone else who is willing to help but they have other interests and I don't want to tie up all of their time figuring this out if they do not enjoy it. :)
« Last Edit: January 31, 2015, 03:00:29 PM by Macpod »

Thomas

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Receiving "communication Error 1" when trying to use the Arduino Sketch
« Reply #2 on: February 09, 2015, 07:31:57 PM »
Hi Jeff,

I don't have a  logic analyzer, also I don't have the skill to work with one.

I found your page and bought the stuff to get it run described here with a Arduino board.

Do you think  we have a chance to  get it work in the near future ? (otherwise I would consider try to find a other solution maybe with a tachometer with a hall sensor or light sensor or something like this.

Thomas

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Receiving "communication Error 1" when trying to use the Arduino Sketch
« Reply #3 on: February 09, 2015, 08:31:19 PM »
Hi Thomas,

If you don't have a logic analyzer then I'm afraid we will have to wait until the UK individual receives his logic analyzer in the mail to solve this.

I'm not sure when his analyzer will arrive but I will post back here once it has. 

Thomas

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Receiving "communication Error 1" when trying to use the Arduino Sketch
« Reply #4 on: February 11, 2015, 01:19:05 PM »
O.K. I have got some news.

I started everything from scratch and noticed that the pint out show in this picture http://macpod.net/misc/sx2_tachometer/images/sx2_cn2_tachometer_port_pinout.jpg

is different to the connector Pins I got. On that connector I have bought,  Pin 7 is the middle (center) Pin , the outer Pins are 1-6 . (different to the picture)

I have connected it different to the shown picture, and now everything works well.

Maybe this helps to other users who have had problems soldering the cables shown in the picture.

Jeff thx anyway for your help :-)

Thomas

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Re: Receiving "communication Error 1" when trying to use the Arduino Sketch
« Reply #5 on: February 12, 2015, 01:20:31 AM »
Glad you got it working Thomas,

I don't think this will help with the other individual's mills as they definitely show indications of a protocol change. They are also directly connecting into the speed adjuster board vs through that port.

Regarding your mill's wiring, my knee-jerk reaction to it is to say you have a defective mill. I know multiple other individuals have made arduino tachometers so I'm pretty sure that image is correct (otherwise surely one person would have emailed me about it over the 3 years it has been published!), but now I will have to go through and triple check again for my sanity :)

« Last Edit: February 12, 2015, 01:26:02 AM by Macpod »

kwilliam

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
I have a SX2P and purchased a Sieg tacho for it.

Well it didn't work - Think it just gave 000000 display so I returned it.

If they have changed the protocol it seems Sieg has shot themselves in the foot then.

Have you had any luck getting your kit working on a SX2P?

Thanks Malcolm


Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
Hi kwilliam,

Yes, my kit has worked with the newer protocols installed on these mills. That is quite a surprise that the official tachometer doesn't work with them. It makes me wonder if there is a problem with the wiring inside of your mill.

Pigi

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Hi,
 first of all, thank for taking care to document everything about this tach.

I have a mill bought in May 2015, and think I have got the one with the protocol change.
I have wired up an arduino and I started with "communication error 1".
I have then added some debug lines and I have noticed that the cycle usually get 69 bits and sometimes also 70.
This obviously lead to the communication error.

Here the sample from the serial output I have added on the second part of the cycle ( when it get the error )
( the first number is "packet_bits_pos"  the last two bits gets from the 69 end 70 ( when it's there ) bits )
( This are collected with the spindle stopped )
69-10000000: 001110000  00001111: 000010100     11101000: 000111110     10101000: 010111110- 10
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
70-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
70-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01

Now from the spindle rotating:
70-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
70-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
70-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
70-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01
69-11000000: 000111000  00000111: 100001010     01110100: 000011111     01010100: 001011111- 01

When the spindle is rotating, sometimes I get a "Communication error 2" but haven't still got some output from there. I'll do this this evening.

I'm waiting to receive a SALEAE clone ( I know, I should have bought the original but being that I think I will use it just few times.... ) and as soosn as I can get it up and runinng I will take some snapshot for you.

Pigi



Pigi

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
I have read on your news page about the change of protocolo, but do you mind to indicate the differences.please ?

Thx

Pigi

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
The newer mill firmware loads have an added 36 bit header to each packet. If you account for these bits the rest of the information is the same.

Pigi

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Thank you very much.

I' ll go hunting for this 36 bit  ;D

Pigi

Macpod

  • Administrator
  • Full Member
  • *****
  • Posts: 179
  • Karma: +3/-0
    • View Profile
The header location is already documented and the arduino code updated (but untested)