More than 9 axes with servo

More
8 years 2 months ago #116478 by andypugh
Homing is harder. The most elegant solution is probably to create a modified Limit3 component with homing as a built-in behaviour.

It can be done with a combination of sample-hold and offset .
Well, you could use sample-hold if it wasn't limited to S32 data anyway. For floating point data (like axis position) you actually need to use a mux2 component with the output looped back to the input.

When the limit switch is tripped you store the current position command in the sample-hold and that is used to offset the command and feedback to the limit-switch origin. There are wrinkles here, such as a sudden large following error and a step change in PID inputs, which is why either a modified Limit3 or a dedicated extra-axis-homing component might be a better idea.

In an ideal world LinuxCNC would simply allow many more joints than axes and would home them along with all the others.

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

More
8 years 2 months ago - 8 years 2 months ago #116544 by Ilya
Replied by Ilya on topic More than 9 axes with servo
I could not understand how to work with the sample_hold component, I always get 0 at the output :(

I also found an lcec.0.3A4.enc-pos-reset pin, which resets the encoder values.
As a result, I made a simultaneous reset of lcec.0.3A4.enc-pos and motion.analog-out-00 using the test python script:
Code:
hal.set_p("lcec.0.3A4.enc-pos-reset","1" ) hal.set_p("limit3.0.load","1") linuxcnc.command().mdi("M68 E0 Q0") hal.set_p("limit3.0.load","0") hal.set_p("lcec.0.3A4.enc-pos-reset","0")

how bad or good do you think this decision is? What could be the problem?

thanks,
ilya
Last edit: 8 years 2 months ago by Ilya.

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

More
8 years 2 months ago #116546 by andypugh
That should be fine. I was trying to think of a less hardware-specific solution.
The following user(s) said Thank You: Ilya

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

Time to create page: 0.231 seconds
Powered by Kunena Forum