Machine warning lights (Red, Amber, Green)

More
06 Jan 2017 16:50 - 06 Jan 2017 16:56 #85350 by Todd Zuercher
halui.program.is-running, goes false when the machine is paused (using the pause button or by an M0/M1 in the file).
Regardless, I believe that the hal example I posted would flash the green light anyway (probably on opposite sides of the stepgen pulse though.)
Last edit: 06 Jan 2017 16:56 by Todd Zuercher.

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

More
06 Jan 2017 16:56 #85351 by tommylight

Todd, thanks, I would prefer to keep it all in hal. I seem to be doing a Tommy as its 1:30am here so I'll play in the morning. I did try hard along the lines you suggest.


Did someone mention me???? What horendous deed did i do mow?
:P :P :P :P :P :P

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

More
06 Jan 2017 17:19 #85352 by Todd Zuercher
One small note, you might want to tie the red light to a not from halui.machine.is-on, rather than to halui.estop.is-activated. That way the red light will turn on for an alarm shut down rather than only for e-stops.)

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

More
06 Jan 2017 22:57 #85368 by rodw
Tommy, you can tell I am still a noob because, It was only 1:30 on the morning! Seasoned professionals like you would be posting at 4:30am :woohoo: :woohoo:

Todd, thanks for your hal example. I was able to fold it into the run/step pause/resume example on the forum here and it now works perfect! The green light remains flashing when single stepping which is also how it should be. I've shot a quick video of the lights so when I' get it up on youtube, I'll post a link here. It is very cool so thanks guys.

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

More
06 Jan 2017 22:58 #85369 by bevins

One small note, you might want to tie the red light to a not from halui.machine.is-on, rather than to halui.estop.is-activated. That way the red light will turn on for an alarm shut down rather than only for e-stops.)


That would cause the red light to be on when the machine is off. You could put other alarms in parrallel with the estop contact on the estop rung and label the red light Alarm.

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

More
06 Jan 2017 23:24 #85372 by rodw

One small note, you might want to tie the red light to a not from halui.machine.is-on, rather than to halui.estop.is-activated. That way the red light will turn on for an alarm shut down rather than only for e-stops.)


I did actually try Todds suggestion and it did not work as expected so I reverted to my old code for the red light. There are several signals I've found that show the estop conditon.

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

More
06 Jan 2017 23:28 #85373 by bevins

One small note, you might want to tie the red light to a not from halui.machine.is-on, rather than to halui.estop.is-activated. That way the red light will turn on for an alarm shut down rather than only for e-stops.)


I did actually try Todds suggestion and it did not work as expected so I reverted to my old code for the red light. There are several signals I've found that show the estop conditon.


I dont know how to do it in HAL but in classic ladder, just put the extra alarms in parrallel with the estop N/O so any of the alarms will cause the red light to come on.

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

More
06 Jan 2017 23:33 #85374 by rodw

halui.program.is-running, goes false when the machine is paused (using the pause button or by an M0/M1 in the file).
Regardless, I believe that the hal example I posted would flash the green light anyway (probably on opposite sides of the stepgen pulse though.)


Todd, as I said in my earlier post, you are correct as the light flashes in a pause or single step situation.

Bevins, I have been ignoring Classic Ladder as so far, HAL has done what I want. I think what complicates HAL is that to implement a simple and clear example like Todd posted, there is a bit of work to get it folded in to existing code. Eg, changing and2.0 to and2.4 and setting the logic inputs elsewhere in the code because the pins are alredy in use.

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

More
07 Jan 2017 00:23 #85375 by rodw
Well here is the video of these lights

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

More
07 Jan 2017 00:42 #85377 by racedirector
Ooooh I am liking this as it it similar to what I want to do. However mine differs in the light bit. I am after the ability to flash a light (basically pulsing an output) to signify different machine status. I have a BD679 attached to pin 14 on my BOB that handles the flashing side of it, its the flashing/pulsing the output in linuxcnc that has me stumped.

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

Time to create page: 0.123 seconds
Powered by Kunena Forum