Add new script

You can add a script in the Scripting section:

Three type of script are proposed:

  • New Script
  • New Multi Script
  • New Block Diagram

After selecting the scenario option, in the pop-up window, you must enter the name of the script, the name and comment (optional). Then click the “Save” button.

Script editing

1. To edit common scripts and multi-scripts, click the script settings button and select “Script”:

Открывается окно редактора скрипта. При создании нового сценария в этом окне вы увидите образец скрипта.

The script editor window opens. When creating a new script in this window, you will see a sample script.

In the editor window you can write your own script or use the Copy/Paste (Ctrl-C/Ctrl-V) method to paste any script text. Sample scripts can be found in the Script Templates section.

2. To edit the scripts in the form of block-diagram, click the script settings button and select “Block Diagram”:

An empty window opens to add block-diagram elements. More information on working with block-diagrams can be found in the “Graphical Script Editor” section.

Linking multi-scripts to devices

In normal scripts, devices are already present in the script code.
In the multi-script code, there is not a specific device, but a device class. Therefore, it is necessary to associate a multi-script with devices.

Select “Launch For Devices” and press the plus button:

In the pop-up properties window, select the devices that will work under this script.
By repeating this operation several times, you can assign other combinations of devices that will work under this script.
This allows you to use one script for many combinations of devices, rather than writing a new script each time.

Loading / Unloading Scripts

You can save the script to your computer and later download it in a new project:

Press the button to call the Additional menu and select “Upload to ZIP file”.
By selecting the “Download from ZIP file” command, you can download the script from the ZIP file.

Debugger

You can use the debugger to test the script or search for errors.
Select “Debugger” and click the Start button:

All messages in the debugger arrive in real time.

Note: The script continues to run regardless of whether the debugger is started or stopped.