Edit an ST Program
To enter the code for an ST program, you need to edit as ST Program database item. During the editing process, you will enter the code that defines the behavior that is to be provided by the program, for example, you could enter the code that allows the ST program to perform a calculation. When you save the code, the program you have created is stored in the ST Program database item.
To edit an ST program:
- In the Database Bar, either double-click on an ST program item or right-click on it and select the Edit Structured Text Programoption from the context sensitive menu.
The ST program is displayed in Design mode. You can only edit an ST program in Design mode.
The main display area of the ST program editor shows the ST program. Each ST program has
PROGRAM <program name>
;
END_PROGRAM
by default as ST programs require these. You will define the Logic of your ST program between PROGRAM and END_PROGRAM.
At the bottom of the ST program editor is a smaller frame. This frame is the compiler. \ClearSCADA displays diagnostic information in this section.
To code an ST program, you need to understand the Structured Text language. We explain some of the basic principles of the ST language in these sections, but you may need to broaden your knowledge by referring to a Third Party source.
For more information, see the topics that are listed in the gray footer section at the bottom of this topic. Select the relevant entry to display the topic that you require.
The following sections explain how to check that your ST program is coded correctly:
- Compiling an ST Program or ST Library
- Debugging an ST Program
- Viewing the Variables in your ST Program.
The following section explains how to configure your ST program (including how to define when the program is executed):