LinuxCNC is Running......?

More
08 Jul 2020 16:43 #173993 by hoffb77
I've been looking for a signal in hal that activates the moment the interface(EMC2) is executed and stays on until it is terminated. My intent is to use that signal to notify the PLC that the interface has dropped out. I've been looking for it. Maybe its right in front of me and I dont see it.

Right now as is stands, the PLC will enter fault status once the drives indicate a following error, which safely stops the machine but I would like to add that signal to my control loop and have a unique indication.

Thanks, Ben

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

More
08 Jul 2020 17:56 #174003 by tommylight

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

More
08 Jul 2020 19:05 #174009 by hoffb77
Replied by hoffb77 on topic LinuxCNC is Running......?
Thank you Tommy.

I thought maybe something was in the default servo thread I wasn't seeing.

I imagine I could add it to the servo thread instead of adding a base thread. I do not require a squarewave pulse. A digital signal will suit my purpose.

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

More
08 Jul 2020 19:50 #174019 by tommylight
Yes you can add it to the servo thread, and the frequency will be lower (1kHz max), but it will work.
If you do not need a square wave, just add a 10uF capacitor to the output of the charge pump, and test if whatever has to be shut down by it, shuts down immediately. If it has a delay, try a 1uF or lower value.

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

More
08 Jul 2020 20:16 #174023 by hoffb77
Replied by hoffb77 on topic LinuxCNC is Running......?
I dug into the functions man pages once you mentioned the charge pump. It looks as if the watchdog.ok-out (if enabled ) will serve my purpose very well.

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

More
08 Jul 2020 21:16 #174031 by hoffb77
Replied by hoffb77 on topic LinuxCNC is Running......?
Looking at the mesa watchdog function....it has a pin has_bit, I will work off this for now and report back.

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

More
09 Jul 2020 04:19 #174051 by hoffb77
Replied by hoffb77 on topic LinuxCNC is Running......?
Seeing as has-bit kills all outputs to original state that wont quite work. I have set an output true when the thread starts. That will be enough for now.

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

More
09 Jul 2020 08:14 #174069 by tommylight
You might be able to set that same output to false in the shutdown.hal, so it should go low when exiting LinuxCNC.
But that will not go down in case of a crash, but that does not happen ever with Linuxcnc. If it starts and works, it will work, even if something else in Linux goes down, LinuxCNC will continue to run.

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

More
09 Jul 2020 14:51 #174097 by hoffb77
Replied by hoffb77 on topic LinuxCNC is Running......?
You are correct. In the 10+ years I have been running machines on this interface I never had a failure due to emc2. I've had a few PC power supply failures and brain farts are ten fold.

My current setup signals an Estop to the PLC in the event of an ethernet disconnect or a PC crash. And thats what I need.

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

Time to create page: 0.182 seconds
Powered by Kunena Forum