I have a HAL which is detecting a false edge when loading LinuxCNC.

I have AM882 drives which have an Alarm signal output, and an Enable 
signal input.  Alarm is active-low, Enable is active by default unless 
LinuxCNC deasserts it, all goes through a 7i92 card.  The Alarm signal 
is tied to its automatic stall detection. If tripped, it disables the 
STEP input, and only cycling Enable pin resets the drive.  The Enable 
pin also disables the motor current output entirely, which is 
undesirable, the Z will drop. Initially I had Enable go inactive during 
estop but it caused the Z to fall for no good reason.  Arguably less 
safe.  You have an emergency, bit is spinning, you hit e-stop, the Z 
falls with the motor still going.

I just simplified it in HAL as "if the estop-assert AND Alarm-assert 
have a posedge, trigger a one-shot to deassert the Enable signal for 
0.25 sec".

It mostly does what I expect!  However, when I boot up LinuxCNC, Enable 
deasserts for 0.25 sec and the Z falls a bit, I definitely don't want it 
to do that without Alarm being asserted.  At the time, the drivers were 
already physically powered and Alarm is NOT asserted (low) for sure.

I presume the first servo-thread cycle has a glitchy value on startup, 
probably the 7i92 itself.  I'm not sure what actually does that, the 
one-shot has to have a posedge to start the one-shot, not a level.  If 
the HAL saw Alarm pin as low (asserted) during booting and the first 
cycle of servo-thread saw its correct value (high, deasserted), that 
should NOT trigger the one-shot. Wrong edge.

Any idea?

Danny



------------------------------------------------------------------------------
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to