Feature Description
Canvas Script Editor uses JavaScript ES5. Only Features from ES5 or before are available to be used. Please refer to ECMAScript Documentation for complete specifications on the language. Features related to Document Object Model (DOM) are not supported in Canvas Script Editor.
Canvas can only run 100 scripts concurrently. If any more scripts attempt execution while 100 scripts are running, the script will not execute, and a warning notification will be shown during runtime.
Designer Functions
Script Editor Properties
Creating a Script
To create a script, hit the + in the Script Editor. This will open a dropdown menu with the Create New Script or Create New Command option. Both will open up their respective setup pages when selecting either one. Create New Script will open a new page asking for the Script's name, the Running Type, and the Running Period. There are three running types: Periodic, Startup, and Manual. Once the configuration is set up, clicking OK will close the window and create a new script with the specified format.
Editing a Script
To edit a script, double-left-click on the script. This will open up a panel on the right side of the Script Editor screen. This displays all of the functionality of a script. Users can make changes to the script on this screen. Changes are automatically saved as the user makes the edits. Users can also compile any script by clicking the Validate icon. This will confirm that the syntax is correct and can compile properly.
Script Usage
Scripts can be called upon in a few different ways. The first way that they can be called on is by Startup. If the script is set to be a Startup script, it will execute when the program runtime begins. Periodic is another way to call a script. Periodic will call the script at a set interval of time that is user-defined within the Script Properties; the range for this interval time is 0 - 2147483647 ms. The final way to call a script is through Manual calls. These can be done where an object can have an action and call the script or command to call this script. An example would be a momentary button; this object has an Action tab, and the script can be called in any specified cause of Press, Double Click, or Release.
Add Comment