Hal trigger when LINUXCNC launched but not else running

More
2 years 6 months ago #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
2 years 6 months ago - 2 years 6 months ago #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: 2 years 6 months ago by PCW. Reason: better motion pin

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

More
2 years 6 months ago #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
2 years 6 months ago #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
2 years 6 months ago #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
2 years 6 months ago #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.

Time to create page: 0.342 seconds
Powered by Kunena Forum