Skip to main content
Firmware Stable

emGUI workspace preset

This tutorial show example how to set-up a workspace environment in emGUI, so you do not need to open everything manually every time.

info
  • Assume that a successful comlink with the device has already been established (the device is connected, connection options are set, the driver is installed, etc.).
  • Assume that we are working with just a single device.

A workspace is a collection of opened dialogs, plots and other windows. You can save the current workspace to a file and load it later. This is useful if you want to quickly restore your working environment. The plugins do serve this purpose. The code below is a simple example of how to set up a workspace in emGUI. To test, save the code to a file with the .sxp extension and open with emGUI as a plugin.

tip

You can have multiple workspaces as .sxp files, and just by double clicking on them, you can open them in emGUI.

# a mininimalist worskpace example for an ESC controller (how to pre-set the emgui for your bench)

#open-up the emGUI window
sxapi.show()

#perform search for nodes
sxapi.search()

#show scope
sxapi.show("{scope}")

#fetch the controller with address 0
kontroler = sxapi.node(0)

#open the node dialog
kontroler.open()

#open dialogs of two adjacent variables
kontroler.open("/driver/supply/voltage")
kontroler.open("/driver/supply/current")

#clear scope and plot two variables
kontroler.executeSimple("clear", "all")
kontroler.executeSimple("plot", "/driver/temp")