SSI encoder

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
17 Jan 2023 14:37 #262238 by nhanpham
SSI encoder was created by nhanpham
hi all,I have an ABS encoder, CAX60.My config in linuxcnc

loadrt hm2_eth board_ip="10.10.10.10" config=" num_encoders=0  num_stepgens=6  ssi_chan_0=ENC_ZH%24eENC_SIGN_Z%1b 

# set speed
setp hm2_7i80.0.dpll.02.timer-us -300

setp hm2_7i80.0.ssi.00.frequency-khz 125  
setp hm2_7i80.0.ssi.00.timer-number 2
setp hm2_7i80.0.ssi.00.ENC_ZH.counts-per-rev 4096
setp hm2_7i80.0.ssi.00.ENC_ZH.scale -32.25

However, I received a random encode value. 
At home position:
When I open the linuxcnc and turn on power, I get the 0 value of encoder. 
But sometimes i turn on linuxcn at this position and i get 250 value of encoder.

can you hel me check my config is correctly?

thank you so much
Attachments:

Please Log in or Create an account to join the conversation.

More
17 Jan 2023 14:46 #262239 by andypugh
Replied by andypugh on topic SSI encoder
Is the problem just the startup value, or does it not give useful output either?
ie, is it _always_ random, or just at startup?

Please Log in or Create an account to join the conversation.

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
17 Jan 2023 14:58 #262240 by nhanpham
Replied by nhanpham on topic SSI encoder
It is simply random when starting up. 
thank you so much

Please Log in or Create an account to join the conversation.

More
17 Jan 2023 15:12 #262243 by PCW
Replied by PCW on topic SSI encoder
I would first try all 4 combinations of polarity

(all 4 combinations of swapped CLK+ and CLK- and swapped DATA+and DATA-)

Also its hard to tell from the awful data sheet, but it seems to be a Gray
coded encoder so your format string may not be correct.

Please Log in or Create an account to join the conversation.

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
17 Jan 2023 16:03 #262245 by nhanpham
Replied by nhanpham on topic SSI encoder
Could you possibly give me a format for this encoder? i will test it tomorrow.

Thank you for your help.

Please Log in or Create an account to join the conversation.

More
17 Jan 2023 16:08 #262246 by andypugh
Replied by andypugh on topic SSI encoder
Apart from the startup value, does the position otherwise work, ie increases smoothly without jumps as it is turned?

Please Log in or Create an account to join the conversation.

More
17 Jan 2023 16:19 - 17 Jan 2023 16:31 #262249 by PCW
Replied by PCW on topic SSI encoder
Also the documentation mentions a parity bit... Not sure if this is present or not

Replacing the "e" with a "g" in the format string will convert the encoders Gray code to binary
Last edit: 17 Jan 2023 16:31 by PCW.

Please Log in or Create an account to join the conversation.

  • nhanpham
  • nhanpham's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
17 Jan 2023 16:26 #262251 by nhanpham
Replied by nhanpham on topic SSI encoder
maybe. my encoder is a binary code.

Yes, this error just happens at startup. After it worked perfectly from the start pos, which it read during startup

thank you

Please Log in or Create an account to join the conversation.

More
17 Jan 2023 17:33 #262255 by PCW
Replied by PCW on topic SSI encoder
So it only works properly after the encoder position changed?

A SSI encoder should always have a valid output

Please Log in or Create an account to join the conversation.

More
18 Jan 2023 01:07 #262295 by annhan
Replied by annhan on topic SSI encoder
Yes, it has an error in that it gets a different encoder value when I turn on the encoder power.After reading this value, the LinuxCNC worked normally and produced no errors. 
thank you

Please Log in or Create an account to join the conversation.

Time to create page: 0.162 seconds
Powered by Kunena Forum