How motor-pos-fb and motor-pos-cmd coexist?

More
19 Mar 2019 14:21 #128973 by andypugh
Whether "near" will work depends on whether you want to use the scale to stop on position error or to correct for position error.

In the first case I think that you can simply connect the motor-pos-fb pin to the scale position rather than the stepgen position. (assuming correct scaling) No need for any extra HAL functions other than the encoder counters for the scale.

To correct for error you need to add a PID, and sum the output of the PID with the stepgen position command as well as taking the position feedback from the scale.

So, the axis position goes to the (position mode) stepgen which gets the axis close to the commanded positon, then the PID makes up the difference, and the scales report back the actual position, which should match the commanded position.
The PID probably wants to be quite low-gain and mainly I-based.

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

More
19 Mar 2019 16:27 - 19 Mar 2019 16:34 #128982 by Emanresu
Thats exactly what i did on Monday.
Its so simple if i dont make it complicated myselfe =D

I conected hm2_5i25.0.encoder.00.position to axis.0.motor-pos-fb. No PID, no NEAR or anything.
My Screwdrives have 1040mm of travel and an error of 0,00017mm /100mm (on Paper at 20°C)

Unfortunately my Servo is cappable of 10.000steps/rev. But my Screwdrives have a pitch of 16mm/rev.

Thats almost what i see on my Linearencoders now.
On every Stop i bounce between +- 0,002 - 0,004

Ferror is about 3 - 5mm at 30.000mm/sec. And almost 0,008 ~ F100 - F500.

I noticed one last "little" Problem....
If the 1040mm Screw warms up. I get up to 0,1mm error at 1000mm.
So ~ 0,01 at 100mm. Which most of my Parts have.

I see my Problem as solved so far, until you see more Problems i dont realize yet.
Last edit: 19 Mar 2019 16:34 by Emanresu.

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

Time to create page: 0.058 seconds
Powered by Kunena Forum