Modbus input for absolute encoder position?

More
1 year 9 months ago #319352 by Ehsan_R
Has anyone been able to get the position of the servo motor via modbus and then do the homing operation?

Please Log in to join the conversation.

More
1 year 8 months ago #320515 by Ehsan_R
I have a servo motor with an absolute encoder that can send and receive data via RS485 RTU. I was also able to receive the encoder data using mb2hal. The encoder data includes the pulse count and the number of turns. The pulse count changes between 0 and 65535 per turn. The number of turns counts up from zero for positive numbers and decreases by one from 65536 for negative numbers. Now, my question is, first, how can I convert this value in HAL to an angle and then to a length, and second, how can I use this value for homing?

 

Please Log in to join the conversation.

More
1 year 8 months ago #320613 by Todd Zuercher
First thing you'd need to do is convert your signed integer encoder counts and turn counts to floats using the CONV_S32_FLOAT hal component. Then you would need to multiply the turns by 65536 and that and the counts together to get the total counts, finally you would need to multiply the total counts by your encoder scale to get the distance (or if a rotary axis degrees.) You could do most of the summing and scaling in a single step using the SUM2 hal component since each of the SUM2 inputs have their own scale factor inpout.

But I'm not exactly sure how you might use that position information to set the home position for homing the axis in Linuxcnc. (But I think it could/can be done.) Also remember that data feedback from modbus isn't in real-time, and is subject to significant transmitting delays and resulting inaccuracy, So you will need to only use that feedback for position when stopped or only for "rough" positioning when moving.

Please Log in to join the conversation.

More
1 year 8 months ago #320619 by Martin.L
My servos just need a boolean input, guess yours need the same

Please Log in to join the conversation.

More
1 year 8 months ago #320733 by Ehsan_R
Yes, it is as you say, but I only want to use it for homing. That is, instead of using the limit switch at the start of the movement, when the homing command is sent, it opens the RS485 port, reads the encoder value, and if it receives the result, it considers it as the home position, and then closes the RS485 port.

Please Log in to join the conversation.

More
1 year 8 months ago #320734 by Ehsan_R
I use this servo motor.
 

Attachment not found

Please Log in to join the conversation.

More
9 months 2 weeks ago #341463 by harindugamlath
Hi, did anyone get this to work?
I'm planning to use delta absolute servos for a retrofit, I'm very familiar with mesa hardware and really like to use absolute servo position for homing. 

Please Log in to join the conversation.

Time to create page: 0.182 seconds
Powered by Kunena Forum