mvm_gui_get_ui — Receive current data from the clients.
mvm_gui_get_ui( : : ServerHandle, ConnectionHandle : UiDict)
Receives current data from the clients. The specified clients are queried actively for all of their data (all elements with attribute 'data-bind'). The data of each client is represented as HALCON dictionary where each key corresponds to the data-bind ID.
The dictionary values depend on the UI element and should be intuitive for most UI elements. For buttons, a counter is being returned which is 0 if the button was not pressed and a positive integer counting the number of button presses since the last call to mvm_gui_get_ui.
Multiple connections can be specified as tuple. A ConnectionHandle with the value 'all' means that the UI state is requested from all connected clients and is the default. A value of 'first' addresses only the first connection. Additionally, an optional custom error handling can be specified in ConnectionHandle.
For further explanations on connection handles and custom error handling, see the MachineVisionMakers / HDevGUI chapter documentation for this extension package.
ServerHandle (input_control) serial → (handle)
GUI server handle
ConnectionHandle (input_control) socket(-array) → (handle / string)
The UI connection handle
Default value: 'all'
List of values: 'ack_error_ignore', 'ack_error_lowlevel', 'ack_error_raise', 'all', 'connection_error_ignore', 'connection_error_lowlevel', 'connection_error_raise', 'first'
UiDict (output_control) string(-array) → (string / integer / real)
a value
while (true)
mvm_gui_get_ui (ServerHandle, 'first', UiDict)
Slider := UiDict.slider1
* ...
wait_seconds (0.020)
endwhile
Foundation