Delay axis movement while brake releases

More
5 years 9 months ago #195654 by andypugh

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.

More
5 years 9 months ago #195655 by andypugh

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.

More
5 years 9 months ago #195662 by chris@cnc

andypugh wrote: That makes it very hard to tell if any axis is attempting to move.


you are right.:laugh:
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.

More
5 years 9 months ago #195717 by lllars
Toggling the enable pin did work. It turned I needed only about 30ms of delay, so the following error was not an issue. Of course as I was polishing it up, I had the servo drive manual open, and realized it could handle the brake engagement for me, delays and all. So that's how I've got it hooked up now and it is working well.

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.

More
5 years 3 months ago - 5 years 3 months ago #216256 by nkp
/* sudo halcompile --install unlocking.comp */
component unlocking "HAL component that arbitrates between various states and sets adaptive feed accordingly";

pin in float idleaxis-##[3] ;
pin in bit isunlockaxis-##[3] ;

pin out float afeed "adaptive feed";

function _ ;
license "GPL";
;;

FUNCTION(_) {
    int i;
    for (i = 0 ; i < 3; i++){
        if(idleaxis(i)){
          if(!isunlockaxis(i)) {afeed = 0.0001;}               
          else {afeed = 1;}              
        }     
    }
if(!idleaxis(0) && !idleaxis(1) && !idleaxis(2) )  {afeed = 1.0;}
}
Code:
loadrt unlocking addf   unlocking.0   servo-thread net adfeed  unlocking.0.afeed  motion.adaptive-feed net in:positionX    unlocking.0.idleaxis-00   axis.0.joint-vel-cmd net in:positionY    unlocking.0.idleaxis-01   axis.1.joint-vel-cmd net in:positionZ    unlocking.0.idleaxis-02   axis.2.joint-vel-cmd net  isunlockX   unlocking.0.isunlockaxis-00 net  isunlockY   unlocking.0.isunlockaxis-01 net  isunlockZ   unlocking.0.isunlockaxis-02 loadusr halshow 5axis.halshow loadusr sim_pin   isunlockX  isunlockY  isunlockZ 
Last edit: 5 years 3 months ago by nkp.

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

More
5 years 3 months ago #216258 by nkp
It would be nice to always check: is active M52
(from component )

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

Time to create page: 0.125 seconds
Powered by Kunena Forum