- Posts: 617
- Thank you received: 0
Multiple Alarm Inputs Hal help needed
Please Log in to join the conversation.
linuxcnc.org/docs/2.7/html/hal/basic-hal.html#_net
Hint or2 is a simple way to have two inputs act on one signal.
linuxcnc.org/docs/2.7/html/man/man9/or2.9.html
JT
Please Log in to join the conversation.
Thanks for the links but I have trouble with the basics obviously. I need a more copy/paste example.
I'm not trying to be lazy, I'm just getting frustrated at myself for not catching on fast enough....
Please Log in to join the conversation.
JT
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
So right now you have a signal connecting your VFD alarm connected directly to motion.enable. That works great for just that one signal. To connect more than one signal to motion.enable, you have to use an "or2" or some other hal logic component.
example:
net vfda => or2.0.in1 <= (output pin of your VFD alarm)
net servoa => or2.0.in2 <= (output of your Servo alarm)
net enable => motion.enable <= or.0.out
don't forget you also have to loadrt the or2 component and addf it to a thread (usually the servo thread).
However there are other ways for a hal bit to stop motion, and or set alarms than just using motion.enable. Such as for example axis.N.amp-fault-in, is intended for being connected to a servo fault alarm signal, or iocontrol.0.lube_level is intended for a low lube level signal. Some of the less critical ones you might consider motion.feed-inhibit instead of motion.enable.
You might also want to consider using linuxcnc.org/docs/html/man/man9/message.9.html to give your user an explanation of why the machine may have stopped and or turned off.
Please Log in to join the conversation.
Thanks for the link to the messages as that was going to be my next question.
Out of curiosity, how is iocontrol.0.lube_level handled if the fault clears? Say, if I run low on way oil, machine pauses, displays alrm message, I fill up the reservoir, fault status changes and what happens? Hit resume button and motion continues?
If I connect to these existing hal pins, is their behavior already internally determined by linuxcnc or do I need to link them further such as to motion.feed-inhibit?
Please Log in to join the conversation.
Having never used those pins I don't know what they do, but interesting to find out in a sim perhaps.
JT
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
No there isn't a fault pin in specifically for the spindle (something I've lamented about before), so you'll need to press something else into service for that. One option could be to add a dummy [AXIS_N] heading to your ini file, and then use the amp fault in for that. All you need to do (if you have a 3 axis machine) would be to add a line [AXIS_3] and nothing else to your ini file, then Motion will make all the axis.3. pins available.
Please Log in to join the conversation.
The missing thing for me was giving the signal a name. I thought net iocontrol.0.lube_level hm2_5i25.0.7i84.0.0.input-06-not would work but obviously not as I needed to connect a signal to the source:
net low-oil-alarm iocontrol.0.lube_level <= hm2_5i25.0.7i84.0.0.input-06-not
The above works. Correct me please if I'm still getting the syntax wrong.
net Z-Servo-Alarm axis.2.amp-fault-in <= hm2_5i25.0.7i84.0.0.input-10
The drive fault signal opens the drive contactors as I have them wired to the estop circuit and machine enable and kills power to the spindle and servos. This seems to work however it takes a few seconds to register a fault after pulling the encoder connector on my DMM drives. maybe this is okay for backup safety.
What's nice is the drive alarm message comes up.
Yes, a spindle fault pin would be nice as well as an io for low air pressure.
Please Log in to join the conversation.
OT-CNC wrote: Okay I learned something today
The missing thing for me was giving the signal a name. I thought net iocontrol.0.lube_level hm2_5i25.0.7i84.0.0.input-06-not would work but obviously not as I needed to connect a signal to the source:
net low-oil-alarm iocontrol.0.lube_level <= hm2_5i25.0.7i84.0.0.input-06-not
The above works. Correct me please if I'm still getting the syntax wrong.
net Z-Servo-Alarm axis.2.amp-fault-in <= hm2_5i25.0.7i84.0.0.input-10
The drive fault signal opens the drive contactors as I have them wired to the estop circuit and machine enable and kills power to the spindle and servos. This seems to work however it takes a few seconds to register a fault after pulling the encoder connector on my DMM drives. maybe this is okay for backup safety.
What's nice is the drive alarm message comes up.
Yes, a spindle fault pin would be nice as well as an io for low air pressure.
I would vote for a Low Vacuum io also.
Please Log in to join the conversation.
