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 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 contact or coil, a confirmation message is returned to replace the cell contents by the new contact.
If a contact is placed in a cell that is already occupied by another object and can not be replaced (e.g. FFBs), an error message is returned.
A placed contact automatically creates a connection with its neighboring
objects on the left and right if they are of the Bool
data type and there are no free cells between them.
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
dialog box, in the tab by selecting the checkbox.
Note
In the
dialog box on the tab, if the checkbox is selected, then the corresponding properties dialog box is automatically opened when an object is placed. The procedures explained here are used when the checkbox is cleared.Placing contacts:
Placing contacts:
Step |
Action |
---|---|
1 |
Select the desired contact. |
2 |
Click the target cell in the LD 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:
|
Assigning actual parameters
Assigning actual parameters:
Step |
Action |
---|---|
1 |
Open the properties dialog box for the contact. Result: The contacts properties dialog box is opened. Example: ![]() |
2 |
You have the following options to enter the actual parameters:
Example of a variable selection dialog box: ![]() |
3 |
Confirm the selected variable with .Result:
|
4 |
If you do not want to assign the
variable an address or comment, confirm using Enter or the 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 ![]() |
6 |
Confirm with Enter or the 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.