On Mon, Sep 5, 2016, at 05:39 PM, Danny Miller wrote:
> 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.

Is this a retrofit of a professional class machine?  Or a hobby 
class machine?

I can't imagine a pro-class CNC machine that will drop the Z.
If the screw doesn't have enough friction to hold the Z, they
will put a spring-applied, electrically released brake on the 
Z servo motor.  ANYTHING that causes loss of servo control
(estop, power failure, axis disable, following error) kills power
to the brake coil and the springs apply the brake (fail-safe).

If your machine has a free-falling Z and doesn't have a brake, 
sooner or later there is going to be an accident.  What happens
in a power failure?

I strongly recommend either mechanically or pneumatically
counterbalancing the Z, or adding a fail-safe brake to the motor.
 
> 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?
> 
Not sure of the specifics of your case.  But in general you 
cannot trust ANY bit coming from a computer to ALWAYS
be right.

All bets are off before LinuxCNC runs, during startup, and
after LinuxCNC exits.

For example, I have a PC that toggles the parport bits
several times during boot.  It can be a bit disconcerting
hearing the spindle motor reversing contactor thunking
in and out.  But nothing bad happens, because the main
power going to that contactor goes thru another contactor
that has a charge-pump based HARDWARE estop.  That
main power contactor doesn't pull in until LinuxCNC is
started and I bring it out of estop.  And the main power
contactor drops back out as soon as LinuxCNC stops.


-- 
  John Kasunich
  jmkasun...@fastmail.fm

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

Reply via email to