Hi ts,
Check the FlexGUI section about HAL pins:
gnipsel.com/linuxcnc/flexgui/hal.html
Example at bottom.
To link something from HAL into FlexGUI:
* Note that your main HAL file is for defining the bulk of the connections. Here we're talking about a -postgui.hal file, which specifically only gets loaded after the GUI is available, and only contains GUI-related things. So your .ini file must have an entry like
POSTGUI_HALFILE = mypostgui.hal. This is the -postgui.hal file we're talking about.
1. Give a button a Dynamic Property type of
String, name of
function, and value of
hal_pin. This lets FlexGUI know that this button will do something in your -postgui.hal file.
2. Give the button another Dynamic Property of
String, named
pin_name, then set that value to the name you want to be visible in your -postgui.hal file, like
DriveReset for example. Save your .ui in QtDesigner.
3. Open the -postgui.hal file, and make the link like this:
net whoa_drive DriveReset => hm2_7c80.0.ssr.00.out-04 or whatever connection you like. Then when you press that button, it will affect the HAL device you have connected it to.