Enter Structured Text logic
Use the Structured Text Editor to add Structured Text logic to a routine.
Prerequisites
To enter Structured Text logic
- Click in the editor to place your cursor on a line in the routine.
- In the Structured Text EditorToolbox, select the Statement icons to insert commonly used logical statements:
- If_then

- Case_of

- For_do

- While_do

- Repeat_until

TIP: IfToolboxis not visible, on the panebar, select
Toolbox.In theToolboxSearchbox, type an instruction mnemonic, such as OSFI, to display a specific instruction. Double-click the instruction to insert it.Select an instruction type, such as Bit, to display all the instructions of that type.TIP: You can also add to a routine by right-clicking and selectingAdd Elementfrom the context menu. - On a line in the Structured Text Editor, type the first characters of a statement, condition, or instruction. Intellisense displays elements that include those characters that you can insert at that location. To display the Intellisense list of all valid elements at the cursor location, pressCTRL + Space.When you select a statement to insert, the Structured Text Editor inserts a complete construct. You fill in the tags and required elements for the construct. For more information on constructs, see Structured Text Components: Constructs.TIP: Look for the inlay hint that helps describe required parameters for a statement or instruction.COP instruction example

Provide Feedback