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 and Display Instance Names options 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.
When working with different controllers, define parameters of program organization units (POUs) for multiple controllers by navigating the tabs for individual controllers that display in the Parameters view.
Insert blocks from the LD stencil in the
Toolbox
. Set the type of a block using the
Block Selector
at any time following insertion. When the type of block is set, 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 with a letter or an underscore, enclose the variable name in single quotes as follows: 'abc'.
  1. Select a variable from the drop-down combo-box:
  2. Type a literal value in the text box:
When selecting items like local variables, controller variables, system variables, and defined words from the drop-down combo box, type characters in the text box to focus on the possible items. Focus on listed items by typing letters, digits, and specific special characters: !, #, $, %, &, \, *, +, -, /, <, :, =, >, ?, @, ^, _, `, |, and ~.

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 o1:= (value1 > value 2); ELSE o1:= 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.
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.
TIP: When dragging blocks, the possible drop points on a rung display while moving over the rung.
Drag a block
To reposition a block within the diagram, select the block while holding down the left mouse button, then drag the block to the required location on a rung where a drop point displays.
Access the parameters view
  1. In the
    Application View
    , right-click the required function or function block instance in the controller library, and then click
    Parameters
    .
  2. To define the parameters of a function or function block, select the block, then enter the required information in the fields provided.
Insert a block
While inserting or dragging a block, drop points indicate the possible locations where the block can be placed on a rung.
  1. From the
    Toolbox
    , drag the block element into the language container and place it on the rung where a drop point displays.
  2. In the
    Block Selector
    , locate the required block. Sort the block list according to the columns by setting these in ascending or descending order.
    To force the inclusion of the EN/ENO parameters, select Enable EN/ENO.
  3. Click
    OK
    .
Insert a parallel block
  1. From the
    Toolbox
    , drag the branch element onto the existing block in the language container.
  2. To place a block element on the branch, do the following:
    1. From the
      Toolbox
      , drag the block element into the language container, placing it on the branch. The
      Block Selector
      displays.
    2. In the
      Block Selector
      , locate the required block. Sort the block list according to the columns by setting these in ascending or descending order.
    3. To force the inclusion of the EN/ENO parameters, select
      Enable EN/ENO
      .
  3. Click
    OK
    .
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal