Introduction

Contacts can be placed in any free cell except cells directly on the right power rail.

If a contact is placed in a cell that was previously occupied by a contact, coil, a Boolean link or a label, the cell contents are replaced by the new contact.

If a contact is placed in a cell that is already occupied by another object (e.g. FFBs), an error message is returned.

The following are permitted as actual parameters for contacts:

  • Boolean variables

  • Boolean literals (0, 1, FALSE, TRUE)

  • Boolean addresses (topological addresses or symbolic addresses)

  • ST expressions that return a Boolean result (e.g. VarA > VarB)

    ST expressions as formal parameters on contacts are an extension of IEC 61131-3 and must be explicitly enabled via the Tools > Project Settings > Program > Languages > Common by activating the Usage of ST expressions check box.

Automatically Assign a Variable

If via Tools > Options > Data and Languages > Languages the Automatically assign a variable to a new graphical object check box is activated, then the corresponding properties dialog is automatically opened when an object is placed. The procedures explained here are used when the check box is deactivated.

Placing Contacts

Step

Action

1

Select the desired contact, see also Selecting Contacts.

2

Click the target cell in the LL984 section.

or

Use the Arrow keys to move the gray field to the target position, and press Enter.

Result: The selected contact is inserted.

3

To place further contacts of the same type:

  • Click the target cell in the LL984 section.

    or

    Use the Arrow keys to move the gray field to the target position and press Enter.

  • To return to selection mode:

    Press the Esc key.

  • To insert other objects:

    Select the object you wish to insert.

Assigning Actual Parameters

Step

Action

1

Open the properties dialog for the contact.

Result: The contacts properties dialog is opened.

Example:

2

You have the following options to enter the actual parameters:

  • You can enter %Mx (%Ix) and confirm using Enter.

  • You can enter the actual parameter and confirm using Enter.

  • You can select the actual parameter from the list of recently used names using the symbol and confirm using Enter.

    or

  • Using the button ... you can open a Data Selection dialog and confirm the selected variables there with OK.

3

Confirm the selected variable with OK.

Result:

  • If the selected variable is declared, it is enabled in the section. A syntax and semantics check is performed and the procedure ends here.

  • If the variable is not declared, a Create variable? dialog opens. In this case, continue with the following steps of this procedure.

    NOTE: If you wish to declare the variable later, close the dialog using the symbol. In this case, the variable name is enabled in the section, but not declared.
    NOTE: Entering a binary address (%M1 / %I1) opens the Create variable dialog proposing a variable name (_000001 / _100001) that can be modified. If there is already a variable associated to %M1 / %I1 it will be reused as proposal.

4

If you do not want to assign the variable an address or comment, confirm using Enter or the symbol.

Result: The variable is declared and enabled in the section. A syntax and semantics check is performed and the procedure ends here.

Example:

5

If you do want to assign the variable an address and/or comment, use the symbol for obtaining an advanced dialog and enter the address and/or comment.

6

Confirm with Enter or the symbol.

Result: The variable is declared and enabled in the section. A syntax and semantics check is performed immediately after the statement is entered.

Example:

Usage of ST Expressions

To enter ST expressions for contacts the same rules apply as for entering ST expressions for FFB pins.