Delay axis movement while brake releases
I have it set up using a wcomp to check if the commanded velocity for the axis is non-zero, and that controls the brake. It all works great except that I am losing a few steps during the fraction of a second it takes for the brake to disengage. How can I delay sending steps to the axis until after the brake disengages?
Here's the relevant section of my hal file:
### handle 4th axis brake ###
loadrt wcomp names=wcomp_vzero
loadrt not names=not_vzero
loadrt timedelay names=timedelay_brake,timedelay_brake_movement
addf wcomp_vzero servo-thread
addf not_vzero servo-thread
addf timedelay_brake servo-thread
# wcomp output is true when input between min and max, false otherwise
setp wcomp_vzero.min -0.0001
setp wcomp_vzero.max 0.0001
setp timedelay_brake.on-delay 1.0
setp timedelay_brake.off-delay 0.0
net a-vel-cmd => wcomp_vzero.in
# drive is wired so that brake is on when switch is off
# so need to invert logic
net A_stopped wcomp_vzero.out => timedelay_brake.in
net A_brake_on timedelay_brake.out => not_vzero.in
net A_brake_off not_vzero.out => hm2_7i95.0.ssr.00.out-02
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I'm sort of simulating this tonight with only the PC and Mesa card powered up, but all the motor drivers powered off. I'll fire it up all the way tomorrow and see if it actually works and if the dial indicator shows I'm still losing any steps.
Please Log in or Create an account to join the conversation.
one solution would be to use motion.feed−inhibit.
At time when brake is working, stop motion in machine. So should not possible, that any pulse go lost.
Usually is the brake control by M-Code to avoid any flicker. So take a look that the brake operate not so nervous. Relay contacts burn very fast by this way.
Please Log in or Create an account to join the conversation.
chris@cnc wrote: Hi,
one solution would be to use motion.feed−inhibit.
That makes it very hard to tell if any axis is attempting to move.
The reason I suggested the miniscule adaptive-feed approach is that it is the only way that I have found to tell if a joint is commanded to move without it actually moving.
There must be other ways, as the GUIs can show "distance to go" but I don't think that is available in realtime on a HAL pin.
Please Log in or Create an account to join the conversation.
lllars wrote: But for moves that don't involve the 4th axis, the brake won't (and shouldn't) be released. So motion would never proceed.
You never told us you wanted to be able to move other axes

This is probably a job for a simple custom HAL component that arbitrates between various states and sets adaptive feed accordingly.
All axes stationary - adaptive feed 1e-10 - brake on
Any axis but Z moving - AF 1 - brake on
Z moving and brake on - AF 1e-10, brake release
Z moving and brake released - AF 1, brake release
Please Log in or Create an account to join the conversation.
andypugh wrote: That makes it very hard to tell if any axis is attempting to move.
you are right.

I not want to measure the movement in this way. But i thing it's safe to stop all motion in case off using a brake. So it's more a proposal in future if problem solved.
Another idea about this issue.
Any axis are little move during working brake by gravity.
Do you have an external encoder?
Please Log in or Create an account to join the conversation.
Thank you for helping me think through this guys. Andy, your solution sounds like it would be a good one, especially if the delay needed was longer than mine was.
Please Log in or Create an account to join the conversation.