Hal trigger when LINUXCNC launched but not else running

More
30 Apr 2024 20:33 #299418 by V34michel
Hi, I'm looking for a HAL signal to command a static relay to powered on all powers (ohmic, steppe drivers, thc..).
The purpose is to only powered on all the command system when LinuxCNC is launched and not only when the linux PC started.
I want to use a static relay linked to an output of my partport (ie P9).  So i'm looking for a trigger event.
regards, Michel

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

More
30 Apr 2024 21:37 - 30 Apr 2024 21:40 #299424 by PCW
Often a charge-pump is needed for parallel port setups
to come up in a defined state. The BIOs sometimes probes
the parallel port hardware and toggles output bits at startup.

That said, you could simply link motion.motion-enabled to parallel port
pin 9, something like this:

net linuxcnc-on motion.motion-enabled parport.0.pin-09-out

If the polarity is wrong you may need to add:

setp parport.0.pin-09-out-invert true
 
Last edit: 30 Apr 2024 21:40 by PCW. Reason: better motion pin

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

More
01 May 2024 06:31 #299441 by V34michel
"net linuxcnc-on motion.motion-enabled parport.0.pin-09-out."

it does not work. For additional information I use version 9.2.
I cannot find the linuxcnc-on motion.motion-enabled signal with the HAL viewer. On the other hand, using the :plasmac:torch-enable signal works, but that's not what I'm looking for. I would like a signal that would be active if LinuxCNC is properly launched.
Here is the line that I added in "custom_postgui.hal"

#POWER Relay
#net linuxcnc-on motion.motion-enabled => parport.0.pin-09-out
net plasmac:torch-enable => parport.0.pin-09-out

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

More
01 May 2024 06:37 #299442 by V34michel
"The BIOs sometimes probes the parallel port hardware and toggles output bits at startup"

I confirm, this is why I use 2 relays in series with the NO and NC contacts to activate the torch. The first is connected to the 'torch-enable' signal and the second to 'torch-on':

// custom_postgui.hal
#TORCH_ENABLE
net plasmac:torch-enable => parport.1.pin-03-out
setp parport.1.pin-03-out-invert 1

//"myproject".hal
net plasmac:torch-on => parport.1.pin-02-out

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

More
01 May 2024 12:49 #299454 by tommylight
e-stop-out
machine-is-enabled
amplifier-enable
x-enable
y-enable
...
there are many pins you can use, depending on what and under what circumstances it should go on.
Use a DVM to find an output pin that does not toggle during boot, usually there are 1 or more.

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

More
01 May 2024 13:35 #299463 by PCW
The  hal net statement:

"net linuxcnc-on motion.motion-enabled parport.0.pin-09-out."

Does work, you may not find the signal linuxcnc-on because it is created by that
statement. As tommylight said, there are other pins you can use to drive your
parallel port pin but motion.motion-enabled should work.

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

More
01 May 2024 18:17 #299488 by V34michel
Hi,
In fact it's half working : with this line
net linuxcnc motion.enable => parport.0.pin-09-out
when launch LinuxCNC, relay linked to pin-09 powered ON, but when I close LinuxCNC it doesn't stop. Have you an idea ?
regards, Michel

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

More
01 May 2024 18:39 - 01 May 2024 18:41 #299497 by PCW
Are you saying:

net linuxcnc motion.motion-enabled => parport.0.pin-09-out

does not work?

(it works for me but only goes on when  the machine in the power-on state)

I chose motion.motion-enabled rather than motion.enable because it goes false
when you toggle LinuxCNC power (the power button on the screen) so a normal
shutdown turns it off
 
Last edit: 01 May 2024 18:41 by PCW.

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

More
01 May 2024 19:30 #299503 by tommylight

when launch LinuxCNC, relay linked to pin-09 powered ON, but when I close LinuxCNC it doesn't stop.

That is normal for parallel port, it does not reset by itself, so if you are trying to do that, you will need a charge pump.
There was another topic (or was it this one) to use the shutdown.hal to reset the port when LinuxCNC exits, but somehow it went quiet, or i was to busy.

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

More
02 May 2024 14:26 #299556 by V34michel
<<net linuxcnc motion.motion-enabled => parport.0.pin-09-out>>
yes, it's working but not my initial target.
Initialy I wanted to power on all powers (main and ohmic) at Linuxcnc start. It's working at start but when we quit LinuxCNC, it doesn't cut the power (I don't find a signal activated by quit-yes).
So I decided to only drive the ohmic power and with <<net linuxcnc motion.motion-enabled => parport.0.pin-09-out>> it"s fine. Thank you for help and patient.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.353 seconds
Powered by Kunena Forum