Positioning with PID Loops
29 Jul 2017 23:07 #96666
by andypugh
You could try an "offset" HAL component and a jogwheel (via an encoder counter).
Only if that is how you configure it. Maybe work out what you want based on what other machines do.
Replied by andypugh on topic Positioning with PID Loops
Because it's a manual homing process (the origin of both axis is relative to the tooling fitted in the brake), it's a little screwy when the origin is off and you're commanding to a position. I'll need to add a jog, but not sure yet how best to do it.
You could try an "offset" HAL component and a jogwheel (via an encoder counter).
Now something that I do need to figure out are the limit switches and how best to handle them. From what I gather, reaching a limit in LinuxCNC causes an error, which in turn stops everything.
Only if that is how you configure it. Maybe work out what you want based on what other machines do.
Please Log in or Create an account to join the conversation.
30 Jul 2017 09:15 #96674
by bymccoy
Replied by bymccoy on topic Positioning with PID Loops
Would a jog normally go through the PID, or bypass it and directly control the axis? My PID loops only run when you click "Go", so I don't even need to change the commanded value if I bypass them... but I do need to control the speed (maybe a fixed speed), but that's why wondering if just setting the PID commanded speed plus/minus a given value is easier? That also fixes a race condition if the axis is still positioning and you try jogging...
With the limit switches, I just need safety, and to stop the motors moving in that direction. A user warning is enough and to stop the axis, no other action needs to be taken. If the axis can't reach commanded position then the axis will not be "in position" so the machine can't be operated anyway until it's corrected.
So the limits need to sit between the motor and PID then I think... stopping the motors rather than stopping the PID... this will allow the operator to correct the issue or jog it away etc. I have LED on the UI to show the min/max limits, so for now I'll know why it's stopped.
I need to figure out min/max ranges for the PID, for now they're set by the spin boxes, which is enough for now.
With the limit switches, I just need safety, and to stop the motors moving in that direction. A user warning is enough and to stop the axis, no other action needs to be taken. If the axis can't reach commanded position then the axis will not be "in position" so the machine can't be operated anyway until it's corrected.
So the limits need to sit between the motor and PID then I think... stopping the motors rather than stopping the PID... this will allow the operator to correct the issue or jog it away etc. I have LED on the UI to show the min/max limits, so for now I'll know why it's stopped.
I need to figure out min/max ranges for the PID, for now they're set by the spin boxes, which is enough for now.
Please Log in or Create an account to join the conversation.
30 Jul 2017 21:57 #96708
by andypugh
I would do it on the input side of the PID as a position-domain thing, rather than on the output side as velocity-domain.
Given an MPG and a correctly-scaled encoder counter that should move it accurately and the position feedback should be correct.
You might want to consider what happens if you try a motion command to a jogged axis, what needs to happen then?
Replied by andypugh on topic Positioning with PID Loops
Would a jog normally go through the PID, or bypass it and directly control the axis? .
I would do it on the input side of the PID as a position-domain thing, rather than on the output side as velocity-domain.
Given an MPG and a correctly-scaled encoder counter that should move it accurately and the position feedback should be correct.
You might want to consider what happens if you try a motion command to a jogged axis, what needs to happen then?
Please Log in or Create an account to join the conversation.
Time to create page: 0.066 seconds