Setting up external E-stop, limits & home switches

More
01 Jul 2013 10:24 #36183 by AggieMEEN
The background: Total newbie trying to climb the learning curve. I'm running a 3-axis gantry style CNC router (The FLA-100 to be exact) driven by a G540 stepper controller with NEMA-23 motors.

I've got an external E-stop that's linked in to the G540, and while it works fine to stop the machine via the G540, LinuxCNC keeps running the program as if nothing happened. I'd very much like to have LinuxCNC stop along with the machine, and show that the E-stop had been tripped. How is this done? Through stepconf wizard? Manually editing some configuration?

There are six miniature switches waiting to be installed onto the mill to serve as limit and home switches for the three axes. Are these configured in the same way as the E-stop?

Thanks in advance for the help!

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

More
01 Jul 2013 14:23 #36184 by cncbasher
you need to have your estop switch as an input to linuxcnc
not knowing how this switch is wired , I can only give general info at the moment

estop is an input which is normaly closed and can be selected in stepconf .
you then have 3 options either use the estop out pin to operate a relay , or use the amplifier enable , or as with the geko's the charge pump

the appropriate additional lines needed in your hal file are
with estop switch input being for example pin 15 and an estop output for relay being pin 14

net estop-ext <= parport.0.pin-15-in
net estop-out => parport.0.pin-14-out
as your using g540's then you will be using the charge pump so you should already have the following line

net estop-out charge-pump.enable iocontrol.0.user-enable-out

the limit and homing done a similar way by adding the input pins again stepconf can be used or just hand edit the halfile

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

More
01 Jul 2013 17:26 #36189 by BigJohnT
I prefer to use the estop_latch component, as it works much better at staying in sync that using iocontrol.

The sample code is here:

linuxcnc.org/index.php/english/forum/47-...5861-external-e-stop

Your limit switches are connected in hal to axis.N.neg-lim-sw-in and axis.N.pos-lim-sw-in

www.linuxcnc.org/docs/html/man/man9/axis.9.html

JT

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

More
02 Jul 2013 00:08 #36201 by AggieMEEN
I'll have to sit down this evening after work to get the fine details on machine and file configurations, but... okay, here I get to show my noobness. :unsure:

@CNCBasher:

I will have to check the status of my charge pump switch. The G540 manual had me disable the charge pump in step 3 of setup. I'll see if it is still disabled, enable it if that's the case, and (checking manual here) also check my BIOS to see if the parallel port is set to ECP / send only and change it to EPP / send-receive.

The wiring of the switch? It's a normally closed switch when the machine is running. When I press the Uh-Oh Button it goes to open state. Is this what you meant?

I recall seeing an E-Stop under outputs in Stepconf wizard already called, and I can see that there is an E-Stop option under the inputs section. Do I need E-Stop listed under both input and output columns in the stepconf wizard? Does it matter which pins I'm using in stepconf wizard?

I guess I'll have to use the Gecko's charge pump, since I don't have a relay wired in, or have any understanding of the amplifier enable function.

The lines of code I see are pure gibberish to me right now, but I'm sure I'll understand it eventually. (I have to if I want to be able to run this machine properly!)

Looks like there are two ways of setting things up here. One is through stepconf wizard, the other is by manually editing the HAL file. Which are the advantages of each?

Really appreciate the help!

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

More
02 Jul 2013 10:20 #36224 by AggieMEEN
I had a chance to do some checking this evening.

The charge pump switch was switched off - so I flipped it on.

BIOS is now set to "Bi-Directional" as opposed to EPP (they have both, which makes me wonder what the difference is). I'm running an Intel D525 Atom in single-core mode to keep the latency low.

I ran stepconf and set charge pump to pin 16 per the G540 manual.

Here is where I am now:

If I set EStop Out to Pin1 and EStop In to Pin10 (or any other input), I cannot engage the stepper motors at all in LinuxCNC.

If I completely remove references to "Estop" in both output and input pins, I can toggle machine power and EStop using F2 and F1 keys, respectively. The Estop Oh-Shit button also works, but LinuxCNC isn't recognizing when it is engaged.

This is some progress, at least. I'm able to use LinuxCNC to control EStop and power to the mill. But the external EStop is still in standalone mode.

I did notice that Pin17 was listed as "Amplifier Enable." Might this pose an issue?

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

More
02 Jul 2013 14:07 #36226 by cncbasher
stepconf is realy just an aid into getting a workable start , after that it's usual to hand edit the file
any pin can be given most uses , although be careful some parralell port pins are only inputs or outputs

the easy way is to attach your hal and ini files if you have problems , it's easier for us to see and gives more information ..
the geko's have the chargepump on a specific pin I believe .

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

More
02 Jul 2013 20:54 #36235 by AggieMEEN

stepconf is realy just an aid into getting a workable start , after that it's usual to hand edit the file
any pin can be given most uses , although be careful some parralell port pins are only inputs or outputs

the easy way is to attach your hal and ini files if you have problems , it's easier for us to see and gives more information ..
the geko's have the chargepump on a specific pin I believe .


Attached my HAL file per your suggestion.

Thanks for clearing up Stepconf's role as an aid. I thought it was an equivalent to manual editing of the HAL files. From what I have seen of the inside of the HAL file, manual editing won't be too problematic (provided I keep a backup of the original and learn how to read the logic of the information in there).

Yes, the Gecko requires Pin-16 for Charge Pump.

Thank you for the help!
Attachments:

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

More
04 Jul 2013 11:15 #36296 by AggieMEEN
Solution. Probably an obvious one.

After reading up on the fundamentals of how HAL works I went in and cleared all of the unnecessary "wires" from the output and input columns within the stepconf with the intention of having a clean slate upon which to work.

I then used the notion of "wires" again and set the only input as E-Stop In, since the E-Stop switch wasn't physically connected to the computer, but rather to the Gecko. No dice there. I checked the Invert option, and everything worked fine. F1 and F2 keyboard commands function as intended, and my external E-Stop works on both Gecko and is recognized in LinuxCNC.

Progress, but slow.

Personal note: am not sure why a NC E-Stop switch would need an invert at this time, and that is unacceptable. Clearly I have a lot to learn.

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

More
04 Jul 2013 13:28 #36298 by cncbasher

Solution. Probably an obvious one.

After reading up on the fundamentals of how HAL works I went in and cleared all of the unnecessary "wires" from the output and input columns within the stepconf with the intention of having a clean slate upon which to work.

I then used the notion of "wires" again and set the only input as E-Stop In, since the E-Stop switch wasn't physically connected to the computer, but rather to the Gecko. No dice there. I checked the Invert option, and everything worked fine. F1 and F2 keyboard commands function as intended, and my external E-Stop works on both Gecko and is recognized in LinuxCNC.

Progress, but slow.

Personal note: am not sure why a NC E-Stop switch would need an invert at this time, and that is unacceptable. Clearly I have a lot to learn.


why is this unacceptable ? , it has nothing to do with the physical operaton of the switch , EStop are usualy normaly closed switches for safety reasons , if their is a fault in the estop circuit or wiring then the machine
will not switch on , therefore it's a self checking circuit , other wise you could end up say with a broken wire , and you would never know until you hit the estop and nothing happened !

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

More
04 Jul 2013 22:18 #36306 by andypugh

Personal note: am not sure why a NC E-Stop switch would need an invert at this time, and that is unacceptable. Clearly I have a lot to learn.


How is the e-stop switch wired?

The parallel port pins have a pull-up, so if they are not connected to ground they float high (value 1 in HAL)
One way to wire is to connect the E-stop to ground and the pin. Any fault in the wire, or if the button is pressed, allows the pin to float high, and trigger the fault.

It sounds like your switch is connected to +5V, so I rather suspect that pressing it will not result in a state-change of the parallel port pin.

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

Time to create page: 0.201 seconds
Powered by Kunena Forum