Editing Ladder Diagram (LD) Algorithms

Adding an LD Algorithm to a Basic Function Block Type

You can add an LD algorithm to a basic FB type with the New item of the popup menu of the basic FB type's ECC (Execution Control Chart).

Editing the LD Algorithm


Clicking on the algorithm name in the Navigation tree will cause the LD algorithm to appear in the Workspace area as shown above. You can then edit the algorithm rung-by-rung as described below.

Adding a Rung to the LD

You can add a rung to the LD by clicking the New Rung item of the Workspace popup menu. The rung dialog will open so you can edit the new rung.

Copy and Paste

You can a dd a rung to the LD by clicking the Copy popup menu item of an existing rung, then clicking the Paste option of the Worksheet popup menu. The Rung dialog will open so you can edit the new rung.

Moving a Rung in the LD

You can move a rung up or down in the LD (when possible) with the Promote/Demote function of the Rosette.

Deleting a Rung from the LD

You can delete a rung from the LD with the Delete item of the rung's popup menu. A dialog box will pop up to make sure you really want to delete the rung.

The Rung Dialog

This dialog appears when you click the New Rung item of the Workspace popup menu or when you double-click on an existing rung or click on the Edit item of its popup menu.

The output of the rung can be selected from a drop-down list of the Boolean outputs and internal variables of the function block type, and the expression whose value is to be assigned to the output can be entered using a simplified reverse Polish notation. This notation is translated into infix notation for display in the text area, as illustrated above.

Reverse Polish Notation (RPN)

Since the FBD and ST languages are available for the specification of complex algorithms, IEC 61499-2 recommends that the use of the LD language be limited to rungs performing the evaluation of assignment statements of the form:

<output> := <expression>

For portability between software tools, IEC 61499-2 recommends that the XML Expression element have the following simple postfix-operator textual syntax with whitespace-separated terms:

and_expression ::= (variable_name ['!']) | or_expression
| and_expression and_expression '&'

or_expression ::= and_expression | or_expression or_expression '|'

For an example of the use of this syntax, see the rung dialog above; for its corresponding graphical and infix notations, see the LD example above.


>