Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To create and run scripts in JScript, create the the Scriptsystem object object. Then, in the Editor-Debugger utility, enter the script, check it, and debug it.

You can create JScript scripts in Axxon PSIM using the built-in Editor-Debugger utility.

To start the Editor-Debugger utility, click the Editor-Debugger button on the settings panel of the Script system object.

Creating the Script object

To create the Script object in Axxon PSIM, do the following:

  1. In the Programming tab (1) of the System settings
  2. dialog window
  3.  window, create the Script object (2).
  4. Enter the identification number and the name for the Script object (3).
  5. Click the Apply button (4).
    Image Modified
    The settings panel of the Script object will open.
    Image Modified

To configure the Script object, set the values of the following parameters:

  1. 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.

  2. In the Computers field (2), select the computers (kernels) on which the script must run.

    Info
    titleNote

    By default, the script will run on all computers (kernels). The list displays only the computers registered in the Hardware tab of the System settings dialog window. window. You can group check or clear all checkboxes by right-clicking.

    Image Added

  3. Click the Apply button.

...

  1. Click the Editor-Debugger button (3) at the bottom of the Script system object panel to open the Editor-Debuggerutility.

    Info
    titleNote

    Use the Editor-Debugger utility to create, edit and save scripts in JScript. The settings panel of the Script system Script object displays the text of the saved script that can also be edited. 

  2. In the Editor-Debugger utility window, open the Debug-edit script list and select the Script object you want to edit (for example, the Script 1 object, as in the figure below).
  3. In the Script field, enter the text of the script in JScript programming language (see Examples of scripts in the JScript language).

  4. Run the script using a test event. To create a test event, select Debug and edit → Edit test event.
    The Test message window will open opens containing the fields for setting the event parameters.

...

Info
titleNote

For your convenience, when editing you edit the script, the cursor position is saved when saving you save the script or when switching you switch between the scripts in the Editor-Debugger utility window during a session, it which means , until you restart Axxon PSIM is restarted.

Info
titleNote

When you go to the Script messages list when editing you edit a script, and then go back to the corresponding script in the Debug-edit script list, you cannot undo or return the last action.

Debugging a script

You can check if the script syntax is correct using the interpreter, which is built - in into the to the Editor-Debugger utility. The result of the check with the information about the content and location of the error is displayed in the Debugger window corresponding to the script in the Script messages list. If there are errors, you need to edit the script syntax and check it again.

...