Sanyo Denki ABS encoder

More
24 May 2023 08:34 #272082 by PVal
Replied by PVal on topic Sanyo Denki ABS encoder
It actually helped. I had a small error in my command string, but now it's fixed. I tried sending the command to the amplifier to see if I can get any response from it ->amplifier sent back three fields (3x18bit) as described in the datasheet  .
First field is information field and after that there are two data fields. First data field is defining: D0[0:15]=ABS[0:15] and second is: D1[0:7]=ABS[16:23], D1[8:15]=CRC[0:7].  Position data is then read: ABS [0:16] = ST [0:16]  and for full data request code (I will try this later): ABS [17:32] = MT [0:15]. 

I assume that abs_encoder.c should be modified for interperting correct bits as position data? 
Maybe this line of code (line 243):
char* AA64 = "%5pbatt_fail%1b%2ppos_invalid%1b%9plow%16l%2pencoder%16h%2pcomm%10u%7pcrc%5u";
How this is defining the bits? I can see that there are different definitions for position, commutation, etc. but I could use some clarification on this.
And are there also some other files that I should modify for interperting the ST (17bit) value?

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

More
24 May 2023 11:53 #272086 by andypugh
Replied by andypugh on topic Sanyo Denki ABS encoder

I assume that abs_encoder.c should be modified for interperting correct bits as position data?
Maybe this line of code (line 243):
char* AA64 = "%5pbatt_fail%1b%2ppos_invalid%1b%9plow%16l%2pencoder%16h%2pcomm%10u%7pcrc%5u";
How this is defining the bits?


Well, that is just an example string that happens to be hard-coded into the driver for convenience, defining the bits according to:
linuxcnc.org/docs/stable/html/man/man9/h...%20Interface%20(SSI)

In your case I think that the format is fixed, so it might not make any sense to be parsing config strings.
But, then, the config string might be the easy way.

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

Time to create page: 0.335 seconds
Powered by Kunena Forum