emGUI basics I : Hands-on
this tutorial walks through some of the very first things-to-do with the emGUI.
- Let's presume that a successful comlink with the device was already established (the device is connected, connection options were set, the driver was installed, etc.)
- Let's presume that we are manipulating with just a single device.
Search for nodes
Usually, the first thing to do after starting the emGUI, is to hit the Search button. This will initiate the search operation (discovery, login, tree and value fetch) for all the connected devices.
- Accessing some items may be restricted. Depending on your firmware, not all items will be always visible/writable.
- The comlink is designed to be plug-and-play. If the session has been severed (e.g. you unplugged and plugged back the USB cable), the device icon and the Target status will change to indicate this. You may still operate the emGUI but the context might have diverged. Attempt to regain the session through the device's context menu, without losing the context.
- If the connection options have been set with a broadcast device address, the emGUI attempts to discover multiple devices and allows to work with them simultaneously.
- The Search procedure may be configured in the options menu.
Viewing the value of a state variable
The simplest way: you see the value in the contents column. By pressing F1
on a selected variable, the value will be refreshed. A state variable can be read-only.
By double-clicking a state variable, this dialog will pop up. Another way of invocation is through the context menu. You may dock the dialog inside the main emGUI window.
For a one-time refresh, click the refresh button. If you wish to refresh automatically, check the autorefresh option. You may also want to set a refresh period in milliseconds.
For bulk value pull, you can issue the value get command (keyboard F1
). Either on the entire device or through a folder's context menu (values will be refreshed recursively):
For automatic bulk value pull, you can open the relevant folder's (or entire device's) dialog through its context menu:
and check autopull option. You may also want to set a refresh period in milliseconds:
In all the variable viewing dialogs, the bad result of the communication with the device regarding value exchange is indicated by a background color of the value's string:
- orange - an arbitration miss. The value exchange has not been successful.
- red - a critical error (no response from device, etc).
Viewing the values of other variable types
All variables are also accessible through YOS/Shell. Moreover, real-time sampling of any variable(s) can be set up with the plot/scope mechanism.
The general rules for viewing other variables are similar to those described above, with a few remarks:
parameters are read-write accessible and may have extended metadata (such as minimum/maximum/default/presets,... ) and can be saved/loaded to/from an internal non-volatile memory.
permanent variables are read-only (as well as state variables), but most importantly, their values are preserved after reboot.
dynamic variables are read-write accessible and may be added/removed during run-time with YOS scripting or when executing asynchronous tasks (motor identification, etc). For a running script with function calls, you can also view the script's stack memory. If you wish to refresh the list of dynamic variables, use fetch subtree command: