Screens
2 minute read
An interface is organised in screens. A screen is a canvas that you fill with widgets from the Widget library: drag a widget onto it, then set its properties in the Properties panel. The screens bar above the canvas lets you switch screens, both in the editor and in the finished interface.
The screens bar
| Item | What it does |
|---|---|
| Add screen | Adds a new screen to the interface |
| Edit screen position | Changes the order of the screens |
| screen 1 | One button per screen: click it to show that screen |
| Time indicator | The time of the controller |
| State indicator | The state of the machine, such as idle. Which parameter it shows, and the names it uses, are set under States |
| Error handler | Opens and closes the error handler screen |
The add and edit buttons are part of the editor only.
Show a screen only when it applies
A screen can depend on a parameter: the screens bar then only shows its button while the parameter meets a condition. Use this to hide a service screen during normal operation. You set it under Screen in the properties panel with three fields:
- visibility: the parameter path. Leave it empty to always show the screen.
- channel: the element of an array parameter, starting at
0. - expression: the condition, with
xfor the value, for examplex>0orx==4. To combine conditions, write&and|, not&&and||.
A stock robot interface shows its Motion Player screen only when motion profiles are loaded, with this setting:
"visibility": { "path": "root/MotionPlayer/numberOfProfiles", "slot": 0, "expression": "x>0" }
The start screen is always shown: you cannot give it a visibility condition.
Error handler screen
The error handler screen lists the active errors and warnings of the application, and its log messages below them. Open it with the button in the screens bar.
| Item | What it shows |
|---|---|
| Errors | One row per active error: the time it occurred, the subsystem it belongs to (for example 1 for the first axis), its level, its number, and a description |
| acknowledge | Writes to the acknowledge parameter, which tells the application that you have seen the errors. The application then resets the errors that can be reset |
| Logs | The log messages of the application |
The description is the name that your error codes file gives the number. Which parameters and files the error handler uses is set under Errors and Logs in the properties panel.