Go to documentation repository
...
To create and run scripts in the JScript language, you must create the Script object system object. Then, in the the Editor-Debugger utility, enter the script, check it, and debug it.
You can create JScript scripts in Axxon PSIM using the built-in embedded Editor-Debugger utility.
To start the Editor-Debugger utility, click the Editor-Debugger button that is located on the settings panel of the Script object.
...
To create the Script object in Axxon PSIM, do the following:
To configure the Script object, set the values of the following parameters:
In the Time schedule field (1), specify the time schedule of the script execution: Always, Never,or one of the schedules created earlier (1, see Creating and configuring time schedules). The default value is Never.
In the Computers field On the Execute on the specified computers panel (2), select specify the computers (kernels) on on which you want the created script must to run.
| Info | ||
|---|---|---|
| ||
By default, the script will run execution is disabled on all computers (kernels). The computer list displays only the computers registered in the on the Hardware tab of the System settings window. You can group check Right-click to set or clear all checkboxes by right-clickingcheckboxes in the group. |
To create a script in the JScript language in Axxon PSIM, do the following:
Click Use the Editor-Debugger button (3) that is located at the bottom of the Script system object panel to open the Editor-Debuggerutility.
| Info | ||
|---|---|---|
| ||
Use the We recommend using the Editor-Debugger utility to create, edit, and save scripts in the JScript language. The settings panel of the the Script object displays the text of the saved script that can also be editedis also available for editing. |
In the Script field, enter the text of the script in the JScript programming language (see Examples of scripts in the JScript language).
To run the script using with the test event, select use the Debug and Edit → Test run command.
| Info | ||
|---|---|---|
| ||
You can also run the script using with the test event using the the Ctrl+T key combination. |
When working you work with a the script in the the Editor-Debugger utility, you can undo cancel the last action or return the last action. To undo cancel the last action, press the Ctrl+Z key combination. To return the last action, press the Ctrl+Y key combination.
| Info | ||
|---|---|---|
| ||
For your convenience, when you edit the scriptthe convenience of script editing, the cursor position is saved when you save the script or when you switch between the scripts in the the Editor-Debugger utility window during a one session, which means that is, until you restart Axxon PSIM. When you go to the Script messages list when you edit while editing a script , and then go back to the corresponding script in the Debug-edit script list, you cannot undo cancel or return the last action. |
Debugging Debug a script
You can check if the script syntax is correct using the interpreter, which is built in to To check the syntax correction of the script, use the embedded interpreter in the Editor-Debugger utility. The checkup result of the check with the information about the content and location of the error is displayed in the Debugger Debug window corresponding to the script in the Script messages list. If there are errors, you need to must edit the script syntax and check it again.
| Info | ||
|---|---|---|
| ||
See the For detailed information about using test events for script debugging in , see Script debugging. |
After debugging you debug the script using the the Editor-Debugger utility, run it with a real system event. Check the result of the script execution. If the result is incorrect, make the necessary changes and run the script again.
Script creation The process of creating the script is considered complete if it runs correctly.