Insert a code snippet

Code snippets are predefined blocks of code that you can insert in a Structured Text routine.
To insert a code snippet:
  1. Place the cursor at the spot in the routine to insert the code snippet.
  2. Type the keyword for the snippet to insert:
    if
    ,
    elsif
    ,
    case
    ,
    for
    ,
    while
    ,
    repeat
    , or
    #region
    .
  3. Press
    Tab
    .
  4. Fill in the parameters in the snippet. Press
    Tab
    to move to the next parameter, or press
    Shift + Tab
    to move to the previous parameter. The parameters are highlighted in orange.
  5. To exit the snippet session, press
    Esc
    to leave the cursor in its present position, or press
    Enter
    to move the cursor to the next line or to the next logical spot to enter logic.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.