HAL_ToggleButton reset on estop
27 Aug 2019 04:22 #143273
by erik650
HAL_ToggleButton reset on estop was created by erik650
I have a HAL_ToggleButton in a glade panel which is connected to an output pin on a 7i76e board. The toggle button works correctly.
When estop is activated the toggle button remains in whatever state it was in, say true state. I would like to find a way to associate the toggle with estop so the toggle will revert to off state when estop is pressed. Is there a simple way to achieve this?
Bonous question.... is there a way to change the color of a HAL_ToggleButton based on true or false? Similar to how the estop button in gmoccapy changes color from red to green.
The DISPLAY is set to gmoccapy.
Thank you.
When estop is activated the toggle button remains in whatever state it was in, say true state. I would like to find a way to associate the toggle with estop so the toggle will revert to off state when estop is pressed. Is there a simple way to achieve this?
Bonous question.... is there a way to change the color of a HAL_ToggleButton based on true or false? Similar to how the estop button in gmoccapy changes color from red to green.
The DISPLAY is set to gmoccapy.
Thank you.
Please Log in or Create an account to join the conversation.
27 Aug 2019 04:30 #143276
by rodw
Replied by rodw on topic HAL_ToggleButton reset on estop
Someone might have some other ideas but I think you need to modify the python screen handler so an estop event resets the GUI pin.
Please Log in or Create an account to join the conversation.
27 Aug 2019 05:09 #143277
by erik650
Replied by erik650 on topic HAL_ToggleButton reset on estop
I looked into callbacks, but the examples under config/apps/gladevcp simple-callback and class-callback are difficult for me to understand. The callback in simple-callback appears to be scoped to the actual GTK widget and thus lacks access to the estop pins.
My Original thought was to attach a value change callback to estop and manage the toggle value when triggered. But I have no idea how to do this. Any help in that direction would be appreciated.
My Original thought was to attach a value change callback to estop and manage the toggle value when triggered. But I have no idea how to do this. Any help in that direction would be appreciated.
Please Log in or Create an account to join the conversation.
27 Aug 2019 05:15 #143279
by rodw
Replied by rodw on topic HAL_ToggleButton reset on estop
Have a look at the Gmoccappy plasma screen (plasma.py & signals.py) its a good example to get you going. I figured if you had a special button you had written your own screen.
Please Log in or Create an account to join the conversation.
27 Aug 2019 05:40 - 27 Aug 2019 05:40 #143281
by cmorley
Replied by cmorley on topic HAL_ToggleButton reset on estop
You need to have a python handler file for your gladevcp panel.
I would use Gstat to monitor the estop state.
Are you using 2.7 or master?
Gstat is not documented in 2.7 and has many less messages to respond to but it does cover estop/power.
Here is the master version of the docs:
linuxcnc.org/docs/devel/html/gui/GStat.html
Chris M
I would use Gstat to monitor the estop state.
Are you using 2.7 or master?
Gstat is not documented in 2.7 and has many less messages to respond to but it does cover estop/power.
Here is the master version of the docs:
linuxcnc.org/docs/devel/html/gui/GStat.html
Chris M
Last edit: 27 Aug 2019 05:40 by cmorley.
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.065 seconds