Compiling an ST Program or ST Library

You can use the Build menu options to compile your ST program. The compilation feature is useful as it checks that your program has the correct syntax.

There are 2 compile options:

To compile an ST program or ST library:

  1. Display the ST program or ST library in Design mode.
  2. Select the Build menu, then select the Compile option or the Compile with Diagnostics option as required.
    The program or library is compiled and the compile messages are shown in the Compiler display.

    If there are syntax errors, you will need to alter the ST code. Typically, the causes of syntax errors are minor, such as the wrong type of value being specified or a missing semi-colon.

When you have successfully compiled your program, you can use the Debug option to check that its Logic defines the required behavior (see Debugging an ST Program).

If a database item's name includes parentheses ( ), you should ensure that each opening parenthesis is paired with a closing parenthesis. If this is not the case, any Logic programs that reference the database item will not compile successfully. For example, a point named "Analog Point (4" or "Analog Point (4))" will generate a compile error message. Multiple sets of parentheses will compile successfully, including nested parentheses. For example, a Logic program can refer to a point named "Analog Point (4)" or "Analog Point (4(x))". For more information, see Limitation for Database Item Names Referenced in Logic Programs in the ClearSCADA Guide to Logic.


Disclaimer

ClearSCADA 2017 R2