input error and stop the running program

More
12 Oct 2012 07:44 #25261 by RomainM
Hi,

I'm Romain, I live in France and I'm a newbie in Linux and Linux CNC.

I'm finishing to build my gantry CNC Machine (X 2800 mm, Y 1500 mm (gantry), Z 200mm). The X and Y are moved by racks and pinions and Z by ball screw. I use 4 x 130W servo motor with Heidenhain Rod 426 encoder for alls axis drived by 4 CNC drive DG2S. I tune the PID directly on the DG2S drives and I just configure Linux CNC like I used stepper motors.

When a drive detect an error, it stop alls the other drives and , It create a error input on the pin 10 of my parallel port.

I would like to stop the running program when this pin is high. I'm not very comfortable with HAL.

Could you help me to write this lines ?

Thanks for your help.

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

More
12 Oct 2012 10:40 #25264 by BigJohnT
This is the hal lines for an external e-stop input that I recently did for a machine.
# estop
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <=  hm2_5i20.0.gpio.025.in_not

This is what you might have now:
#  ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

I recommend that you read this short introduction to hal or the french version although it seems to be missing some graphics.

John

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

More
12 Oct 2012 17:58 #25274 by Todd Zuercher
The axis.namp-fault-in will stop the exicution of a move or program, place the machine in power off, and gives an error message at the bottom of the screen.

Here is how I handled a fault signal from the drives on a machine:
net Xfault-in pcl720.0.pin-26-in => not.0.in
net Xfault not.0.out => axis.0.amp-fault-in

net Yfault-in pcl720.0.pin-24-in => not.1.in
net Yfault not.1.out => axis.1.amp-fault-in

net Zfault-in pcl720.0.pin-02-in => not.2.in
net Zfault not.2.out => axis.2.amp-fault-in

You would probably use somthing like this:
net Xfault-in parport.0.pin-10-in => axis.0.amp-fault-in

(assuming that this drive is connected to your first parallel port and the first or X axis)

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

More
12 Oct 2012 20:37 #25277 by RomainM
Thanks guys, I'll probably test this tomorrow and I'll tell you if it will works.

Romain

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

More
12 Oct 2012 20:39 #25278 by BigJohnT
I don't have a clue what I was thinking of, Todd is spot on.

John

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

Time to create page: 0.085 seconds
Powered by Kunena Forum