LD Blocks
In a language container, connect blocks to Boolean lines. Blocks can be operators, functions, or function blocks. Boolean inputs and outputs are not always contained within blocks. Boolean inputs connecting blocks to rungs are always executed each cycle. Boolean outputs connecting blocks to rungs control the remaining rung power flow. When inserting blocks in a diagram, the EN and ENO parameters are added to some block interfaces. Also force the inclusion of the EN and ENO parameters for blocks with either one Boolean input, one Boolean output, or no Boolean input and output. Activate the Enable EN/ENO option from the Ladder Diagram options.
For functions and function blocks, set the value of return parameters using coils. The return parameter of a function has the same name as the function. The return parameters of a function block can have any name.
Insert blocks from the
LD Toolbox
. Set the type of a block using the Block Selector
at any time following insertion. When setting the type of block, variables automatically display and are connected to the inputs and outputs of the block. Replace input and output variables by double-clicking them to access the
Variable Selector
or single-clicking them to select from a drop-down combo-box containing the global and local variables. Also, single-click a variable, then type a literal value in the text box provided. When inserting literal values that being with a letter or an underscore, enclose the variable name in single quotes as follows: 'abc'.- Select a variable from the drop-down combo-box:
- Type a literal value in the text box:
When selecting items like local variables, global variables, and defined words from the drop-down combo-box, type characters in the text box to focus on the possible items.
EN Input
For operators, functions, and function blocks where the first input is not a Boolean data type, another input called EN is automatically inserted at the first position since the first input is always connected to the rung. The block is executed only when the EN input is TRUE. The following example shows a comparison operator and its equivalent code expressed in ST:

IF rung_state THEN q := (value1 > value 2); ELSE q := FALSE; END_IF; (* continue rung with o1 state *)
ENO Output
For operators, functions, and function blocks where the first output is not a Boolean data type, another output called ENO is automatically inserted at the first position since the first output is always connected to the rung. The ENO output always has the same state as the first input of the block. The following example shows the AVERAGE function block and its equivalent code expressed in ST:

AVERAGE(rung_state, Signal, 100); OutSignal := AVERAGE.XOUT; eno := rung_state; (* continue rung with eno state *)
EN and ENO Parameters
In some cases, both EN and ENO parameters are required. The following example shows an arithmetic operator and its equivalent code expressed in ST.

IF rung_state THEN result := (value1 + value2); END_IF; eno := rung_state; (* continue rung with eno state *)
While dragging blocks from either the toolbox or within a diagram, the language editor displays the possible drop points. Drop points display as plus signs in a black circle. For elements, the possible drop points display on the rung.
Drop points on a rung while dragging elements over the rung:

Perform these tasks for blocks in the LD editor:
Task | Procedure |
---|---|
Access the Parameters view |
|
Insert a block |
|
Insert a parallel block |
|
Drag a block |
|
Provide Feedback