Enter Structured Text logic

Enter structured text statements, such as loop, conditional, and instruction statements, in the
Structured Text Editor
.
To enter structured text logic:
  1. Create a new structured text routine or open an existing routine to open the
    Structured Text editor
    .
  2. On the
    Structured Text Element toolbar
    , click the applicable instruction group tab to add an instruction.
  3. Click and drag an instruction onto a text line in the structured text editor view. Double-click an instruction to add it at the cursor location.
    The instruction name text is added to the text line.
    TIP:
    In the text window, hover over an instruction to open a tooltip that lists the expected parameters.
  4. To create a tag with a type associated with an instruction, move the cursor over the instruction name, right-click, and select
    Create Instruction Tag...
    to open the
    Create Tag dialog
    with the data type defaulted to the associated instruction type.
  5. Modify the structured text statements as necessary. Complete the parameters for instructions.
    • Use the
      Argument List dialog
      to define the arguments for these parameters. Use the
      Tag Browser
      to quickly select the desired tag to reference. To open the
      Tag Browser
      , right click and choose
      Browse Tags
      .
    • To select a module for a GSV, SSV, or Add-on Instruction, right-click and choose
      Browse Devices
      to show the module browser.
  6. Verify the routine that contains the syntax of structured text logic. To verify a routine, right-click it in the
    Controller Organizer
    and select
    Verify Routine
    . Errors in the text are sent to the
    Output Window
    .
    After a routine has verified successfully, all referenced items will be the correct ones based on syntax.
    TIP:
    The tag cross reference and tag tooltips may be incomplete for structured text logic until the routine verifies successfully. Tags will not show up in the cross reference view until their syntax is correct.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.