Change Structured Text Editor preferences

Use the
Structured Text Editor
category in the
Workstation Options
dialog box to configure the
Structured Text Editor
options.
To change structured text editor preferences:
  1. Select
    Tools
    >
    Options
    to open the
    Workstation Options
    dialog box.
  2. Select the
    Structured Text Editor
    category.
  3. To hide or display line numbers, clear or select
    Show Line Numbers
    . Line numbers are displayed by default.
  4. To enable or disable automatic outlining, clear or select
    Automatic Outlining
    . Automatic outlining is enabled by default.
    Outlining creates a collapsible outline segment when a line starts with
    if
    ,
    while
    ,
    repeat
    ,
    for
    , and
    case
    , and ends with the matching end construct, such as
    end_if
    .
  5. To enable text completion suggestions, select
    Show Completion Prompt when Typing
    . When typing in the editor, a list of possible completion options appears. Double-click the item to insert.
    Show Completion Prompt when Typing
    is enabled by default.
  6. To display or hide tag and parameter values in the editor, select an
    Inline Value Display
    option.
    • Do Not Show
      hides tag and parameter values in the editor. This is the default setting.
    • Show When Monitoring Online
      displays values only when online with the controller.
    • Show Always
      displays values online and offline.
  7. To set or turn off the indentation of new lines in the editor, select an indentation option.
    Smart
    indentation is selected by default.
    • None
      turns off automatic indentation. When pressing
      Enter
      , the cursor is placed at the far left of the new line, with no indentation.
    • Block
      sets the indentation for the new line to the same indent as the preceding line.
    • Smart
      enables indentation based on keywords such as
      if
      ,
      end_if
      ,
      else
      ,
      repeat
      , and
      until
      . When pressing
      Enter
      for a new line following a keyword, the new line is indented or outdented one tab more than the preceding line. When pressing
      Enter
      at the end of a line that does not contain a keyword, the indent matches the indent for the preceding line.
  8. Under the
    Tabs
    heading, configure the following parameters:
    • In
      Tab Size
      , click the number of spaces for each tab to represent.
      The number applies to all tabs in all of the structured text routines. The default tab size value is 4.
    • To create spaces instead of tabs when pressing the Tab key on a keyboard, click
      Insert Spaces
      .
    • To enter a regular tab when you pressing the Tab key, click
      Keep Tabs
      .
      TIP:
      All tabs remain the same if switching modes. Also, if changing the tab size, all tabs change to the new size. Tabs that are entered as spaces remain at the current size.
  9. To open a text box that includes the header text to be automatically added to the beginning of new Structured Text routines, select
    Include Header on Create
    .
    The text box is pre-populated with information blocks: <Company Information>, <Developer Name>, <Routine Name>, <Description>, and <Date>.
    The blocks are filled in automatically from the company name provided when the
    Logix Designer
    application is installed, the name of the user who created the routine, the routine name and description, and the current date. However, if you replace one of the information blocks with text that you type, that information block is not automatically updated. For example, if you replace <Routine Name> with Routine A, then Routine A appears in every header.
    You can also change the layout of the header, including the placement or order of the information blocks.
  10. Select
    Apply
    to save the header text.
  11. Select
    OK
    to accept all the changes made to the preferences and close the
    Workstation Options
    dialog box.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.