Canvas also includes an easy-to-use feature that allows the user to create lists of actions to be completed without the use of scripting. These action lists can be tied to the change in a tag value, opening and closing the page, and other actions, similar to a script.
In the Command Editor, there are two command types:
Global Commands: This command type can be created using the Script Editor or Command Editor in the Action Property in an object and used in any object in the project.
Local Commands:This command type can only be created using the Command Editor in an object Action Property and can only be used in an object where the command is being created.
Global Commands
Method #1
Click Tools > Script Editor… > click + icon > Create New Commands > + Add New Command.
...
Click an object > Action tab > click Action drop-down menu > select Create New Commands. In the Command Editor, click Local Commands drop-down > select Global Commands > click + Add New Command.
...
Local Commands
Click an object > Action tab > click Action drop-down menu > select Create New Commands. In the Command Editor, click Local Commands drop-down > select Global Commands > click + Add New Command.
...
Commands | Functions | Description | |||||
---|---|---|---|---|---|---|---|
Open Page |
| Opens the selected page. Users can select the page by name or by its unique index. | |||||
Close Page |
| Closes the selected page. Users can select the page by name or by its unique index. | |||||
Set Tag Value |
| Sets the selected tag to a specified value. Users can select a constant value to write to the tag, or write another tag’s value to the selected tag. | |||||
Toggle Tag Value |
| Toggles the selected tags' value between 1 and 0. Only ‘BOOL’ type tags can be used with this action. | |||||
Enter Tag Value |
| Open a pop-up keyboard that allows the user to enter a value to be written to the selected tag. Users can write numeric or string values to a tag, though the tag must be the correct type to support the entered data. Ex: The tag must be a ‘STRING’ type for a text entry. Lines 1-3: Launch keypad requesting for a user input that will be stored to the “ANA” tag. Keypad will have a header and subheader title if assigned. Lines 4-5: Set the location for the keypad on the Xpanel screen. Lines 6-7: Set the minimum and maximum values a user can enter. Line 8: The value entered will appear in a chosen format. “H,HHH” is for the hexadecimal formatting, and “#,###” is for the decimal formatting. | |||||
Call Script |
| The Run on separate thread options: Line 1: When the box is unchecked, the selected script will run. This will interrupt any currently running scripts until the imported scripts has completed. Line 2: When the box is checked, the selected script will run in a new thread. This will not interrupt the operation of currently running scripts. | |||||
Enable/Disable Schedule |
| Line 1: Enabled the selected schedule. Line 2: Disables the selected schedule. | |||||
Save Alarm CSV |
| Saves the Alarm Summary to a CSV. Users can select to save the file locally on the Xpanel, to a USB, or to a SD card. Users can also delegate a specific alarm label to be saved in the CSV, all other labels will not be included in the CSV. | |||||
Save Data Log CSV |
| Saves the selected Data Log in a selected Storage Type. | |||||
Start/Stop Data Log |
| Line 1: Start the Data Logging actions Line 1: Stop the Data Loggers action | |||||
Add Row to Data Log |
| Adds a new entry to the Data Log. | |||||
Open Login Window |
| Opens the login window for the user when an object associated to this command is pressed. | |||||
Logout User |
| Log a user out of account when an object associated to this command is pressed. | |||||
Press Key |
| Enters the user specified keystroke. Function codes are used to enter specific key strokes, those key codes can be found at the following link: | |||||
Send Screen Notification |
| In the runtime, notification window will appear on the Xpanel screen. | |||||
Exit Project |
| Exits the project and canvas runtime. | |||||
Open Config Menu |
| Opens the Xpanel Settings menu. | |||||
Set Translation Language |
| Sets the language according to the one specified in the Action List. |
...