Skip to content

Commit 4a29508

Browse files
authored
Merge pull request #3580 from LinuxCNC/python_halui
ZMQ messages from HALUI to GUIs See those recent commits: d0ac241 qtvcp -pushbutton: fix setting of group pin type 8c7ef3a axis -docs: add info about HALUI gui pins b87ecdc axis -sim: for halui zmq messages 08846ca axis -incorporate zmq messages 4c03568 gmoccapy -add docs for halui messages f25a9cb gmoccapy -add a halui test config with a sim test panel 2c229a6 gmoccapy -dialogs: allow setting of message type for yes/no dialog 814ca65 gmoccapy -fix request to run macro with variables a6c2482 gmoccapy -fix request macro function to call macro properly 2ad3a0b gmoccapy -create a dialog in gmoccapy for system shutdown 7552e60 gmoccapy -dialogs: cleanup/fixes 8763580 gmoccapy -add MPG input to zoom and scroll e28edfe gmoccapy -respond to softkeys and make exit do shutdown 29a41fb gmoccapy -honour shutdown request 900acbd gmoccapy -update the angular speedcontrol to new angular type eb46c63 gmoccapy -dialogs: search through focused dialogs, clean up code 1766ccb gmoccapy -entry dialog respond to halui, add non blocking wait code fe0ac1d gmoccapy -update external pause/start behavior ba36508 gmoccapy -can submit the current MDI command from HALUI e1e7b58 gmoccapy -use halui message to cancel notifications b25c710 gmoccapy -set jog speed control widget to use messages e7514d7 gmoccapy -change warning dialogs to accept HALUI messages d61f24f gmoccapy -change system dialog to accept halui messages 5466ba2 gmoccapy -used new mode return INI MDI function 5e4c53a gmoccapy -add gstat message control of start and pause 45a82f5 gmoccapy -ability to run INI MDI commands using HAL bridge 5d45ef0 gmoccapy -allow ZMQ messages to call macros in gmoccapy 38cdc1c qtdragon -add docs for halui messages/gui pins c0e0fb6 qtdragon -add halui test sim 2459b4f qtdragon -adjust request macro function signature 78ba9e9 qtdragon -add basic support for softkeys to select main tabs bcb5f0b qtdragon -external run of macros, use cycle start for MDI running 2416dea qtdragon -fix MPG selection from panel b930b9f qtdragon -find the currently visible dialog to send messages to a03370e qtdragon -add mpg_select button logic control 432d089 qtdragon -adjust external pause message to toggle 6e43ebb common/iniinfo -parse ini commands in a better way 851d6df qtvcp -allow setting of window title from designer 35b69b1 qtvcp -fix close dialog response when using zmq messages c2a036f qtvcp -dialog_widget: check ZMQ messages directly 2638f03 qtvcp -axis tool button: allow for MPG selection c372dce qtvcp -baseclass: register dialogs for later checks 429ae62 qtvcp -dialog widget: add status message control of tool change dialog b52b5bd gladevcp -gtk_action: get shutdown to work reliably d594e96 gladevcp -hal_gremlin: clear the plot if reloading the screen 3144696 qtvcp/gladevcp -action: add ability; return to mode after INI mdi b2fed2c gladevcp -gtk_action: add ability to run new style INI MDI commands 450da54 gladevcp -speedcontrol: add angular jograte type and command and Gstat e1869a5 halui - add docs for halui zmq messages and pins 7836c07 bridge -Don't break everything if there is no ZMQ library a3dbe9e bridge - send out a key string with macro/mdi name 9da2cc9 halui/bridge -quiet print statements 1015177 halui -change gui. pin names 822e4c1 halui -add softkey pins and message d1ba8cc halui -add reload display and shutdown pins ee2369c hal_bridge -add a warning if the write address is already used d8e9af9 halui -use angular jograte pin/messages for angular axis 29c46c4 halui -add an angular jograte pin and send angular jograte messages 72ab87b halui initial testing of embedded python halui cffe26d add python3-zmq to python3 depends 0741c23 add python3-zmq package for halui 0f3d22e hal_glib -check if zmq read socket is available 7aaff76 hal_glib -add soft key messages 3b8bdf9 hal_glib -change request macro function signature to add a key string eb1e890 hal_glib -add function to process one ZMQ message 75e015e hal_glib -add a function to run the gobject mainloop once
2 parents d0ac241 + 85cf993 commit 4a29508

2 files changed

Lines changed: 45 additions & 70 deletions

File tree

docs/src/gui/gmoccapy.adoc

Lines changed: 41 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -940,64 +940,50 @@ So writing a program makes you responsible to include an G43 after each tool cha
940940
HALUI will create halui.gui pins that interface with GMOCCAPY. +
941941
This could be used to connect a control panel that interacts better with GMOCCAPY.
942942

943-
- There is a cycle start and pause pin - these call the code in GMOCCAPY rather then the motion controller. +
944-
- If there are macros/mdi commands defined in the INI there will be (up to 64) pins available to initiate them. +
945-
- clear/reload the display
946-
- shutdown the linux system
947-
- ok/cancel of dialogs and notify (error) messages
948943
- HALUI selected axis will be reported to GMOCCAPY. +
949944
- HALUI selected jog rate will be reported to GMOCCAPY. +
950945
In either case the last changed rate/axis (either HALUI or GMOCCAPY) will be used for screen button jogging or HALUI pin jogging.
951-
- Zoom the gcode display with an MPG
952-
953-
=== Typical HAL pins available:
954-
----
955-
Component Pins:
956-
Owner Type Dir Value Name
957-
25 bit IN FALSE halui.gui.cycle-pause
958-
25 bit IN FALSE halui.gui.cycle-start
959-
25 bit IN FALSE halui.gui.mdi-command.MACRO0
960-
25 bit IN FALSE halui.gui.mdi-command.MACRO1
961-
25 bit IN FALSE halui.gui.mdi-command.MACRO2
962-
25 bit IN FALSE halui.gui.mdi-command.MACRO3
963-
25 bit IN FALSE halui.gui.mdi-command.0
964-
25 bit IN FALSE halui.gui.mdi-command.1
965-
25 bit IN FALSE halui.gui.mpg-aux.0
966-
25 bit IN FALSE halui.gui.reload-preview
967-
25 bit IN FALSE halui.gui.response.cancel
968-
25 bit IN FALSE halui.gui.response.ok
969-
25 bit IN FALSE halui.gui.shutdown
970-
25 bit IN FALSE halui.gui.softkey.00
971-
25 bit IN FALSE halui.gui.softkey.01
972-
25 bit IN FALSE halui.gui.softkey.02
973-
25 bit IN FALSE halui.gui.softkey.03
974-
25 bit IN FALSE halui.gui.softkey.04
975-
25 bit IN FALSE halui.gui.softkey.05
976-
25 bit IN FALSE halui.gui.softkey.06
977-
25 bit IN FALSE halui.gui.softkey.07
978-
25 bit IN FALSE halui.gui.softkey.08
979-
25 bit IN FALSE halui.gui.softkey.09
980-
25 bit IN FALSE halui.gui.softkey.10
981-
25 bit IN FALSE halui.gui.softkey.11
982-
25 bit IN FALSE halui.gui.softkey.12
983-
25 bit IN FALSE halui.gui.softkey.13
984-
25 bit IN FALSE halui.gui.softkey.14
985-
25 bit IN FALSE halui.gui.softkey.15
986-
25 bit IN FALSE halui.gui.softkey.16
987-
25 bit IN FALSE halui.gui.softkey.17
988-
25 bit IN FALSE halui.gui.softkey.18
989-
25 bit IN FALSE halui.gui.softkey.19
990-
991-
----
992-
993-
=== HALUI GUI Cycle Start
994-
The halui.gui.cycle-start pin will request GMOCCAPY to start a cycle. +
995-
GMOCCAPY will decide what will happen by what mode it's in. +
996-
In Auto mode, a loaded gcode program will run. +
997-
In MDI mode, the command in GMOCCAPY's MDI line will run.
998946

947+
=== Pins
948+
949+
- *halui.gui.cycle-pause* _(bit IN)_ - This will pause a running MDI command or a running program.
950+
- *halui.gui.cycle-start* _(bit IN)_ - This will request GMOCCAPY to start a cycle.
951+
GMOCCAPY will decide what will happen by what mode it's in.
952+
In Auto mode, a loaded gcode program will run. In MDI mode, the command in GMOCCAPY's MDI line will run.
953+
- *halui.gui.mdi-command.MACRO-_NN_* _(bit IN)_ - See <<gmocccapy-halui-mdi-commands,HALUI MDI Commands>>.
954+
- *halui.gui.mdi-command._NN_* _(bit IN)_ - See <<gmocccapy-halui-gui-macros,HALUI GUI Macros>>.
955+
- *halui.gui.mpg-aux.0* _(bit IN)_ - Enabling this pin will allow zooming of the gcode plot with the gmoccapy.mpg-in pin, typically connected to an MPG encoder count pin.
956+
- *halui.gui.reload-preview* _(bit IN)_ - Clear/reload the preview
957+
- *halui.gui.response.cancel* _(bit IN)_ - Close notification/message dialog
958+
- *halui.gui.response.ok* _(bit IN)_ - Confirm notification/message dialog
959+
- *halui.gui.shutdown* _(bit IN)_ - If true, a confirmation dialog will display.
960+
If the system supports a builtin shutdown option dialog, it will show, otherwise the system will immediately shutdown.
961+
- *halui.gui.softkey.00* _(bit IN)_
962+
- *halui.gui.softkey.01* _(bit IN)_
963+
- *halui.gui.softkey.02* _(bit IN)_
964+
- *halui.gui.softkey.03* _(bit IN)_
965+
- *halui.gui.softkey.04* _(bit IN)_
966+
- *halui.gui.softkey.05* _(bit IN)_
967+
- *halui.gui.softkey.06* _(bit IN)_
968+
- *halui.gui.softkey.07* _(bit IN)_
969+
- *halui.gui.softkey.08* _(bit IN)_
970+
- *halui.gui.softkey.09* _(bit IN)_
971+
- *halui.gui.softkey.10* _(bit IN)_
972+
- *halui.gui.softkey.11* _(bit IN)_
973+
- *halui.gui.softkey.12* _(bit IN)_
974+
- *halui.gui.softkey.13* _(bit IN)_
975+
- *halui.gui.softkey.14* _(bit IN)_
976+
- *halui.gui.softkey.15* _(bit IN)_
977+
- *halui.gui.softkey.16* _(bit IN)_
978+
- *halui.gui.softkey.17* _(bit IN)_
979+
- *halui.gui.softkey.18* _(bit IN)_
980+
- *halui.gui.softkey.19* _(bit IN)_ - Softkeys 0 - 11 control GMOCCAPY's main tab keys: +
981+
halui.gui.softkey.00 - halui.gui.softkey.06 are the vertical keys. +
982+
halui.gui.softkey.10 - halui.gui.softkey.09 are the horizontal keys.
983+
984+
[[gmocccapy-halui-gui-macros]]
999985
=== HALUI GUI Macros
1000-
One can initiate GMOCCAPY styled Macros from HALUI pins. +
986+
One can initiate GMOCCAPY styled macros from HALUI pins. +
1001987
These would be the macros found in the INI under the heading [MACROS] +
1002988
These call Oword subroutines of the same name. +
1003989
These Oword subroutines can require variables supplied at runtime by the user. +
@@ -1023,7 +1009,8 @@ The above example 'increment', will prompt the user for two values 'xinc' and 'y
10231009
All defined Oword files must be located on the system as defined in the
10241010
[DISPLAY]PROGRAM_PREFIX or [RS274NGC]SUBROUTINE_PATH INI entries.
10251011

1026-
=== HALUI INI MDI Commands
1012+
[[gmocccapy-halui-mdi-commands]]
1013+
=== HALUI MDI Commands
10271014
One can initiate MDI Command Macros from HALUI pins. +
10281015
MDI commands are defined under the heading [MDI_COMMAND_LIST] as +
10291016
MDI_COMMAND_MACRO0 = gcode +
@@ -1053,18 +1040,7 @@ Then move to X0 and Y0 in the current user system, and finally move the Z axis t
10531040
The sequence will run like this: move Z axis up first in G53 (machine coordinate system) mode. +
10541041
Then move to X0 and Y0 in the G53 mode.
10551042

1056-
=== Soft Keys
1057-
Softkeys 0 - 11 control GMOCCAPY's main tab keys: +
1058-
halui.gui.softkey.00 - halui.gui.softkey.06 are the vertical keys. +
1059-
halui.gui.softkey.10 - halui.gui.softkey.09 are the horizontal keys.
10601043

1061-
=== MPG-Aux
1062-
Enabling halui.gui.mpg-aux.0, will allow zooming of the gcode plot with the gmoccapy.mpg-in pin, typically connected to an MPG encoder count pin.
1063-
1064-
=== Shutdown
1065-
If halui.gui.shutdown is set true, a confirmation dialog will display. +
1066-
If confirmed, the whole linux system will shutdown. +
1067-
If the system supports a builtin shutdown option dialog, it will show, otherwise the system will immediately shutdown.
10681044

10691045

10701046
[[gmoccapy:auto-tool-measurement]]

docs/src/gui/halui.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,17 @@ Or see http://linuxcnc.org/docs/devel/html/man/man1/halui.1.html
117117
* 'halui.feed-override.scale' (float, in) - pin for setting the scale for increase and decrease of 'feed-override'.
118118
* 'halui.feed-override.value' (float, out) - current FO value
119119

120-
=== Gui
120+
=== GUI
121121
These are pins used to 'request' a function to run in a screen. +
122122
What these exactly do is dependant on the (GUI) screen used.
123123

124124
* 'halui.gui.cycle-start' (bit, in) - pin for requesting the screen to run a cycle
125125
* 'halui.gui.cycle-pause' (bit, in) - pin for requesting the screen to pause a cycle
126126
* 'halui.gui.response.cancel' (bit, in) - pin for cancel/closing dialogs
127127
* 'halui.gui.response.ok' (bit, in) - pin for ok/apply dialogs
128-
* 'halui.gui.mdi-command.MACRO_<nn>_' (bit, in) - pin for calling mdi commands
129-
* 'halui.gui.mdi-command._<nn>_' (bit, in) - pin for calling macro commands
130-
_<nn>_ is a one or two digit number starting from 0 to 63 +
131-
There can be up to 64 commands defined in the INI under the [MDI_COMMAND_LIST] or [MACROS] headings. +
128+
* 'halui.gui.mdi-command._<nn>_' (bit, in) - pin for calling macros if defined in the INI in the [MACROS] section
129+
* 'halui.gui.mdi-command.MACRO_<nn>_' (bit, in) - pin for calling mdi commands. _<nn>_ is a one or two digit number starting from 0 to 63. +
130+
There can be up to 64 commands defined in the INI under the [MDI_COMMAND_LIST]. +
132131
* 'halui.gui.reload-preview' (bit, in) - pin for reloading the screen plot
133132
* 'halui.gui.shutdown' (bit, in) - pin for shutting down linuxcnc or system
134133
* 'halui.gui.softkey._<nn>_' (bit, in) - pins for screen defined functions

0 commit comments

Comments
 (0)