Interlockings
Interlockings
Interlockings
v.8.20
© 2020 Ing. Punzenberger COPA-DATA GmbH
Distribution and/or reproduction of this document or parts thereof in any form are permitted solely
with the written permission of the company COPA-DATA. Technical data is only used for product
description and are not guaranteed properties in the legal sense. Subject to change, technical or
otherwise.
Contents
2 Interlockings ................................................................................................................................................ 4
GENERAL HELP
If you cannot find any information you require in this help chapter or can think of anything that you
would like added, please send an email to [email protected].
PROJECT SUPPORT
You can receive support for any real project you may have from our customer service team, which
you can contact via email at [email protected].
2 Interlockings
Interlockings control the access to certain zenon objects in the Runtime using variables. Operation
can be blocked or released depending on variables. Depending on process statuses, operations can
be activated/deactivated.
It is possible to create and use various interlockings within one project. In each interlocking several
parallel interlocking conditions are possible.
4 | 26
Detail view of context menu and toolbar
INTERLOCKING OF OBJECTS
All dynamic elements except trend element and message element.
Export all as XML Exports all entries of the interlocking as an XML file.
Information
Variables for the interlocking can be replaced. For more details see chapter
Substitution of variables and functions in dynamic elements.
Example
A machine is in full automatic operation, so it should not be switched to manual
operation. Only if a certain operation status (e.g. STOP) is reached, it is allowed
to be switched. With an interlocking the button for switching between manual
and automatic operation can be locked in the visualization surface, until this
status (e.g. STOP) is true. This can avoid incorrect operation.
TOOLBAR
5 | 26
Detail view of context menu and toolbar
Symbol Description
Export all as XML Exports all entries of the interlocking as an XML file.
6 | 26
Detail view of context menu and toolbar
Parameter Action
7 | 26
Engineering in the Editor
Parameter Action
Note: Variables of interlockings can be substituted for linked symbols and screen switching.
Substitution of interlocking variables is only possible if, in the symbol properties under Linking rule,
the checkbox of the Consider interlocking variables property is activated.
Attention
A variable must not be an interlocking variable and a result variable at the same
time. This configuration would lead to an infinite loop.
The interlocking can contain one or more conditions. To do this, you must first create one or more
new interlocking conditions in the Interlocking Conditions node.
For each condition, a binary formula can be entered in the Logical link property.
The Interlocking Conditions node is also created if a new interlocking is created. The following is
entered by default in each newly-created condition:
Name property: Condition N
Logical link property: <No formula>
Interlocking text property: @<No interlocking text>
8 | 26
Engineering in the Editor
Information
An element in the visualization surface is locked, if the interlocking condition
applies, i.e. is logical 1 – TRUE.
You can find further information in the Runtime manual in the Runtime
messages chapter.
The formula editor (on page 16) can be used to define binary and numeric formulas as a locking
condition. It is opened by clicking on the Logical link property in the properties window. The formula
editor allows the definition of Binary statements with the help of the linked variables and logical or
bitwise and comparison operators. See also the Screens/comparison operators (on page 24) chapter.
Unlocking: If several conditions are linked to the interlocking, all conditions that are met must be
unlocked.
CREATING AN INTERLOCKING
1. Go to Interlocking in the project tree.
2. Go to New Interlocking in the toolbar or in the context menu.
The variable selection dialog is opened.
3. Select the desired interlocking variable with a mouse click.
4. Click on the Add button.
The interlocking variable is added.
5. Close the dialog by clicking on OK.
The selected interlocking variable is shown under variables.
A new condition is added.
6. You can change the name of the interlocking if you want.
9 | 26
Engineering in the Editor
The result variable is initialized with the value 2 (= Interlocking is active.) when the Runtime is started.
The following values of the result variable inform you of the status of the interlocking:
0: not interlocked
1: interlocked
Interlocking is active.
2: at least one condition variable does not have a value.
Interlocking is active.
3: at least one value for a condition has an INVALID bit.
Interlocking is active.
An interlocking is also active if there is no valid value. This is the case if the variable does not contain a
value, has an invalid value or the INVALID bit is set.
Example: Interlocking 1 contains the Interlocking 1 interlocking variable. The substituted interlocking
variables Interlocking 2, Interlocking 3, ... then also use the settings of Interlocking 1.
REQUIREMENTS
The symbol must have content with an interlocking (on page 8).
10 | 26
Engineering in the Editor
In the symbol properties under Linking rule, the checkbox for the Consider interlocking
variables property must be activated.
The desired interlocking variables must have already been created under the Variables node.
Engineering:
1. In the project tree under Screens, select the screen to which you want to link the symbol.
2. Open the desired screen with a double click.
3. In the project tree, go to Screens and Symbol Library.
4. Select the desired symbol with a mouse click.
Note: At least one piece of content of the symbol must have an interlocking in order to be
able to substitute the interlocking variable.
5. Drag & drop the symbol to the desired screen to link the symbol to the screen.
The element entry dialog is opened.
The interlocking variable is visible in the lower part of the dialog under Preview Source and
Target.
Initially, Source and Target are filled with the same interlocking variable.
11 | 26
Engineering in the Editor
6. Enter, under Linking Rule and Source (with '*' or '?'), the name of the interlocking variable in
Preview under Source.
Example: Interlocking 1
Under Replace variables using, Name and Consider interlocking variables are selected by
default.
7. Enter the name of the new interlocking variable under Interlocking rule and Replace with.
Example: Interlocking 2 The variable must have already been created beforehand.
8. In the element entry dialog, click on the Process button.
The number of replaced connections is shown in a separate dialog.
9. Close the dialog by clicking on OK.
The substituted interlocking variable of the content of the symbol is now visible under
Preview and Target.
10. Close the dialog by clicking on OK.
Engineering:
1. In the project tree, go to the Screens and Symbol Library nodes.
2. Double-click on the symbol whose interlocking variables are to be substituted in order to
selected.
A view of the symbol is opened.
3. In the symbol, click on the linked symbol with the interlocking whose interlocking variables
are to be substituted.
4. In the properties of the content of the symbol, go to Interlocking Rule.
5. Click on the selection button ... under Preview.
The element entry dialog is opened.
The interlocking variable is visible in the lower part of the dialog under Preview Source and
Target.
12 | 26
Engineering in the Editor
Initially, Source and Target are filled with the same interlocking variable.
6. Enter, under Linking Rule and Source (with '*' or '?'), the name of the interlocking variable in
Preview under Source.
Example: Interlocking 1
Under Replace variables using, Name and Consider interlocking variables are selected by
default.
7. Enter the name of the new interlocking variable under Interlocking rule and Replace with.
Example: Interlocking 2 The variable must have already been created beforehand.
8. In the element entry dialog, click on the Process button.
The number of replaced connections is shown in a separate dialog.
9. Close the dialog by clicking on OK.
The substituted interlocking variable of the content of the symbol is now visible under
Preview and Target.
10. Close the dialog by clicking on OK.
11. If you want to substitute further content of the symbol with interlocking variables, carry out
the described steps for this content too.
13 | 26
Engineering in the Editor
CREATING AN INTERLOCKING
1. Go to Interlocking in the project tree.
2. Go to New Interlocking in the toolbar or in the context menu.
The variable selection dialog is opened.
3. Select the desired interlocking variable with a mouse click.
4. Click on the Add button.
The interlocking variable is added.
5. Close the dialog by clicking on OK.
The selected interlocking variable is shown under variables.
A new condition is added.
6. You can change the name of the interlocking if you want.
a) To do this, left-click on the newly-created interlocking.
The properties window of the interlocking is opened.
b) Change the name under General and Name.
7. Right-click on Interlocking Conditions and New Interlocking Condition.
8. In the properties of the interlocking condition in the Condition group in Logical Linking, go to
the ... button.
The formula dialog is opened.
9. Please enter an interlocking condition.
Example: (X01.Value > 0)
10. Confirm the input by clicking on OK.
14 | 26
Engineering in the Editor
Initially, Source and Target are filled with the same interlocking variable.
4. Enter, under Linking Rule and Source (with '*' or '?'), the name of the interlocking variable in
Preview under Source.
Example: Interlocking 1
Under Replace variables using, Name and Consider interlocking variables are selected by
default.
5. Enter the name of the new interlocking variable under Interlocking rule and Replace with.
15 | 26
Engineering in the Editor
Example: Interlocking 2 The variable must have already been created beforehand.
6. In the element entry dialog, click on the Process button.
The number of replaced connections is shown in a separate dialog.
7. Close the dialog by clicking on OK.
The substituted interlocking variable of the content of the symbol is now visible under
Preview and Target.
8. Close the dialog by clicking on OK.
9. Click on the disk symbol to save the changes.
You can also substitute interlocking variables if you link the corresponding symbol from the symbol
library to a screen.
Engineering:
1. Open the desired screen to do this.
2. Select the desired symbol in the symbol library and drag & drop it into the screen.
The element entry dialog is opened.
3. Carry out the substitution as described under substitution of the interlocking variables.
16 | 26
Engineering in the Editor
CREATING A FORMULA
Click on the Formula button in the status window. The formula editor opens
You select the bits for your formula in the left screen.
On the right, you find the operators for logical and comparative operations.
Information
Up to 99 variables can be linked in one formula. X01 to X99. The length of the
formula must not exceed 4096 characters.
value bits 32 value bits (from 0 -31) are available. They describe the variable value
bit by bit. For binary variables, only bit 0 is of importance, for SINT and
USINT only the bits from 0-7, etc.
Note: The value refers to the raw value (signal range) of the variables
and not to the converted measuring range.
State bits Here you find the most commonly used status bits. You find the exact
definition and use of the status bits in the Status Bits List (on page 18).
unreceipted Not acknowledged is treated like a usual status bit. But here it is listed
separately, because it does not belong to the classical variable statuses.
value and status In the formulas, all values (value bits and status bits) are treated as binary
values and can be logically linked with AND, OR, etc.
17 | 26
Engineering in the Editor
Parameter Description
The total value and overall status are an exception to this. In order to
arrive at a Boolean expression, this total value has to be ORed bitwise (on
page 23) with a constant. For this, we use the operator &.
For the result 0 (FALSE) of this logical ORing, we get the binary value 0
(FALSE), otherwise 1 (TRUE).
Example: See the bitwise ORing example (on page 23) chapter
Info
The status bits NORM and N_NORM are only available in the formula editor and
cannot be engineered via the status.
If other settings outside the formula are set for the current status, they are combined with the formula
with a logical AND.
Information
Formulas with binary X values and bitwise linking can be used with a maximum of 2
binary values. If more values are required, the linking must be carried out without binary
X values.
Example:
But:
X01.00 AND X02.00 AND X03.00 AND X04.00 AND X05.00 -> works
18 | 26
Engineering in the Editor
19 | 26
Engineering in the Editor
20 | 26
Engineering in the Editor
21 | 26
Engineering in the Editor
Information
In formulas all status bits are available. For other use the availability can be
limited.
You can read details on status processing in the Status processing chapter.
In contrast to bit formulas, the technical range can be modified by a stretch factor -> (not equal '0' or
'1').
Operator Meaning
NOT Negation
OR logical 'OR'
2 NOT
3 AND
4 XOR/OR
Info
Up to 99 variables can be linked in one formula. X01 to X99.
Info
The status bits NORM and N_NORM are only available in the formula editor and
cannot be engineered via the status.
22 | 26
Engineering in the Editor
& AND
| OR
USUAL FORMULA:
X01.M1 OR X01.M2 OR X01.M3 OR X01.M4 OR X01.M5 OR X01.M6 OR X01.M7 OR X01.M8
This query can be made much easier by the logical ORing of the overall status.
LOGICAL ORING
X01.Status & 0xFF
0xFF corresponds to decimal 255; these are the first eight status bits (binary 11111111). If one of these
bit is set to 1, the result of this bitwise ORing is 1 (true), otherwise it is 0 (false).
If, for example, all user status bits except the user status bit M7 should be queried, the binary
statement for this would be: 10111111. Bit 7 is not of interest and is thus set to 0. This corresponds to
0xBF in hexadecimal. The expression for the formula is then: X01.Status & 0xBF.
Instead of ORing bitwise with a constant, the value can also be directly compared to a decimal
number. If the comparison is wrong, the binary value is 0 (false) otherwise it is 1 (true).
Example:
You want to find out if the value is equal to the constant 202: The formula is:
X01.value = 202
23 | 26
Engineering in the Editor
If the value is equal to the constant 202, the result of the comparison is 1 (True) otherwise it is 0
(False).
Note: The bitwise ORing works with the OR character (|), the same as in this example.
< less
> greater
= Equal
<> unequal
To the left and to the right of the comparison operator, there has to be a (total) value or a (total)
status, single bits cannot be used with these comparison operators.
Note: The combined element is not available in the Batch Control module.
Example
X01.value >= X02.value
The result is 1, if the value of X01 is higher than or equal to the value of X02
X01.value = 0x64
The result is 1, if the value of X01 is exactly equal to the numeric value 100 (= hex
0x64)
24 | 26
Engineering in the Editor
Example
Formula: X01.03 AND X02.03
This formula has the status TRUE, if both bit 3 of variable 1 and bit 3 of variable 2 both have the value
1.
Example
(X01.Value> X02.Value)
Example
(X01.Value> X02.Value) AND (X01.Value = X02.Value)
Example
(X01.Value> X02.Value) AND (X01.Value = X02.Value) OR (X01.03 = X02.03)
Example
Formula: (X01.Value = 111)
If a hexadecimal values is used, this is later transferred to decimal by clicking on OK. If a decimal value
is entered and confirmed, the value continues to be displayed as a decimal value after reopening.
Info
It is not possible to use a comma or a period when entering values.
25 | 26
Operation in the Runtime:
The dynamic element that is to be unlocked must be selected. One of the configured interlockings is
selected in its properties in the Authorization properties group for the Interlocking property.
Information
In order to be able to see if the element is locked in the Runtime, the display of
a padlock symbol for locked elements can be activated in the Graphical design
properties group in the Graphical identification active property.
In addition, you can define the appearance of an interlocked button using the
properties Interlocked buttons (Graphical design properties group) or
Locked buttons (under User Administration).
26 | 26