Role Mapping in Data Lists: I/O Variables and Exchange Variables
This topic contains the following sections:
Note
Term definition: Standard = non-safety-related The term "standard" always refers to non-safety-related items/objects. Examples: a standard process data item is only read/written by a non-safety-related I/O device, i.e., a standard device. Standard variables/functions/FBs are non-safety-related data. The term "standard controller" designates the non-safety-related controller. |
The following assignments are possible:
- Variables to process data items (I/O terminals of I/O devices in the PLANT).
- Variables of the controller to standard variables of the Safety PLC (exchange variables).
- Global variables ('Global' keyword) and instance-related I/O variables ('Instance' or 'Program' keyword) to HMI tags.
These assignments have to be done in the Data List of ...
- the 'IEC 61131-3' node, or of
- the SafetyPLC node, or of
- the involved I/O device, or of
- a program instance which contains instance-related I/O variables.
Possible mappings
The following table shows the possible assignments (mappings) of variables and process data items in the Data Lists of the controller and the Safety PLC. Possibly, the mapping can be done in both Data Lists. Read and use the table as follows:
- In the "Result" column, look for the signal, variable or operation type you want to create.
- Select the required variables/data items in the Data List columns as shown in the table.
Note
The Data Lists also provide commands to create new variables and assign them at the same time. |
Note
If a process data item is involved, it has always the leading role in the assignment (in particular in threefold assignments). |
Result | Variable (PLC) | Variable (Safety PLC) | Process Datum | HMI tag 1) | Example no. |
I/O variable of the standard controller | standard variable | – | standard signal (from safety-related or standard I/O device) | creatable | 1 |
Exchange variable | standard variable | standard variable, data direction: 'I' or 'Q' | – | creatable | 2 |
Safety-related I/O variable of the Safety PLC | – | safety-related variable, data direction: 'I' or 'Q' | safety-related signal (from safety-related I/O device) | – | 3 |
Reading a safety-related input signal in the standard application.
Observe the section "Automatic creation of safety-related variables in the Safety PLC" below. | standard variable | safety-related variable, data direction: 'I' | safety-related input signal (from safety-related module) | creatable | 4 |
Reading a safety-related output signal in the standard application.Writing to a safety output from the standard application is not possible. The standard application, however, can read the value which is written to the safety output by the safety application.
Observe the section "Automatic creation of safety-related variables in the Safety PLC" below. | standard variable read-only access | safety-related variable, data direction: 'Q' | safety-related output signal (safety-related module) | creatable | - |
Standard I/O variable of the Safety PLC | – | standard variable, data direction: 'I' or 'Q' | standard signal (from safety-related or standard I/O device) | – | 5 |
Reading a standard input signal of the safety application in the standard application.
Observe the section "Automatic creation of safety-related variables in the Safety PLC" below. | standard variable | standard variable, data direction: 'I' | standard input signal (relating to safety-related application) | creatable | - |
Reading/writing a standard output signal of the safety application from the standard application. In this case, the Safety PLC has read-only access and the signal is written by the standard controller.
Observe the section "Automatic creation of safety-related variables in the Safety PLC" below. | standard variable write access | standard variable, data direction: 'I' | standard output signal (relating to safety-related application) | creatable | - |
Standard diagnostic variable of the Safety PLC | – | standard variable, data direction: 'I' or 'Q' and 'Diag' flag set | – | – | – |
1) | The entries in the "HMI" column of the table relate to the possibility of creating an HMI tag for the respective variable (with its role mapping). "Creatable" means that a context menu command is available for adding an HMI tag. |
Examples
Example 1: standard I/O variable
Global variable of the controller assigned to a process data item of a standard I/O device. The process datum has the leading role and determines the data type of the controller variable.
Example 2: exchange variable
Global variable of the controller assigned to a standard global variable of the Safety PLC. Exchange variables enable the communication between Safety PLC and standard controller. For exchange variables, the data direction ('I' or 'Q') of the Safety PLC variable is important.
No process datum is involved.
This assignment is available in both the controller Data List and the Safety PLC Data List.
Note
The Data List of the standard controller provides the command 'Add Variable (Safety PLC)' which can be used to create and assign a standard variable in the Safety PLC Data List in one step. Accordingly, the Data List of the Safety PLC provides the command 'Add Variable (PLC)' which can be used to create and assign a global variable in the controller Data List. Refer to the topic "Exchanging Data between Controller and Safety PLC" for details. |
Note
Currently, no direct assignments to HMI tags are possible in the Data List of the Safety PLC. However, an HMI tag can be created for exchange variables. |
Note
Diagnostic system variables PLCnext Technology controllers with an integrated Safety PLC may provide diagnostic system variables, e.g., for monitoring the status of Profisafe F-Devices and the Profisafe communication. Such system variables can be assigned to exchange variables in order to inform the standard application about the condition of the functional safety application. |
Refer to the topic "Profisafe Communication/F-Device State Diagnostics" for further information.
Example 3: safety-related I/O variable of the Safety PLC
Safety-related global variable of the Safety PLC assigned to safety-related process data item. The process datum has the leading role and determines the data type of the Safety PLC variable.
Example 4: reading a safety-related input signal in the safety-related application and in the standard application
This is a threefold assignment of a Safety PLC variable, a controller variable and a safety-related process datum. The process datum has the leading role and determines the data types.
A global variable of the controller is assigned to a safety-related I/O variable which is assigned to a safety-related input or output process data item. This way, the standard application is informed about the status of the safety-related variable and process datum. Writing the variable/signal in the standard application is not possible.
Example 5: standard I/O variable of the Safety PLC
Standard variable of the Safety PLC assigned to standard process data item.
Automatic creation of safety-related variables in the Safety PLC
When you connect a safety-related process data item (signal) to a standard PLC variable in a Data List using the Role Picker, PLCnext Engineer automatically creates a corresponding safety-related variable in the Safety PLC and connects it. The name, safety-related data type (and comment, if available) of the automatically created Safety PLC variable are derived from the standard variable. The data direction of the Safety PLC variable is derived from the process data item type:
- A safety-related input signal results in a Safety PLC variable with data direction 'I'. As a result, the safety-related process data item can be read in the safety-related code as well as in the standard application.
- A safety-related output process data item results in a 'Q' variable in the Safety PLC. As a result, the safety-related process data item can be written in the safety-related code. Writing to a safety output from the standard application is not possible. The standard application, however, can read the value which is written to the safety output by the safety application.
Note
Although this results in an assignment of a Safety PLC variable and a controller variable, this is not to be confused with an exchange variable. Exchange variables in the Safety PLC always have a standard data type and no process datum is assigned. In this present threefold assignment, however, the process data item has the leading role. Therefore, the Safety PLC variable has a safety-related data type. |
Rules for reassigning already connected roles (role replacement)
Already defined assignments (that is to say connected roles) can easily be modified by selecting another element in the corresponding field (without disconnecting it first). When replacing an item in the list, this corresponds to disconnecting and reassigning in one step.
The Data List supports the following reassignments:
- A 'Variable (PLC)' can be reassigned to an element of the same type from one of the following columns:
- 'Process Datum'
- 'Variable (Safety PLC)'
- 'HMI Tag'
- A 'Process Datum' can be reassigned to an element of the same type from one the following columns:
- 'Variable (PLC)'
- 'Variable (Safety PLC)'
- A 'Variable (Safety PLC)' can be reassigned to an element of the same type from one the following columns:
- 'Variable (PLC)'
- 'Process Datum'
- An 'HMI Tag' can be reassigned to a 'Variable (PLC)'.
What do you want to do?
How to make a data assignment using the Role Picker
The assignment of variables, process data items (I/O terminals) or HMI tags in a Data List is done by simply selecting an entry in the corresponding columns using the Role Picker as follows:
Note
In Data Lists, Port Lists and variables tables, the selection in drop-down lists is done with a single-click, not with a double-click. |
- In the table, left-click into the field where you want to assign a data item and which is showing the text 'Select ... here' or move the table cursor using the arrow keys or <Tab>/<Shift>+<Tab> to this table field and press <Enter>.The Role Picker appears. It is divided into a tree on the left and data items on the right. The Role Picker only provides data items for selection which match the data type for the assignment to be done.
- Select a folder in the tree on the left and then the data item on the right by clicking it or pressing the <Enter> key.
Note
The Role Picker retains your last selection as long as the editor has not been closed. |
Use the following keys to navigate in the Role Picker:
Press the shortcut ... | ... to ... |
<Tab>/<Shift> + <Tab> | switch between the folders on the left and the entries on the right. |
<ArrowDown>/<ArrowUp> | move the cursor down/up. |
<Enter> (focus on the right side) | select the currently marked entry, close the selection control and apply the entry to the table field. |
<ArrowRight>/<ArrowLeft> (focus on the left side) | expand/collapse the currently marked folder on the left. |
Note
All modifications on the Data List configuration are immediately applied to all other locations (Data Lists) where the corresponding variable/process data item/HMI tag is listed. |
Role assignments can be modified, i.e., the mapping can be replaced without disconnecting an assignment first. Refer to the upper section "Rules for reassigning already connected roles (role replacement)".
Disconnecting variables and process data items
Once an assignment between two roles has been made, the toolbar and context menu provide commands to unassign, i.e., to disconnect them. Depending on the assignment, the following disconnect commands are available:
The following applies:
- A command is applied to the selected table row. (Multiselection is possible.)
- By disconnecting variables, they are not deleted.
 | Disconnect variable of the controller from variable of the Safety PLC. The command is available in the Data List of the controller for variables which are connected to a variable of the Safety PLC. The table row may contain an exchange variable (no process data item involved) or a threefold mapping between controller variable and Safety PLC variable and process datum. Alternatively, right-click the table line and select the appropriate 'Disconnect Variable PLC' command.
|
 | Disconnect process datum from variable. The command is available for variables of the controller and of the Safety PLC which are assigned to a process data item.Alternatively, right-click the table line and select the appropriate 'Disconnect Process Datum' command.
|
 | Disconnect variable of the Safety PLC from variable of the controller. The command is available in the Data List of the Safety PLC for variables which are connected to a controller variable. The table row may contain an exchange variable (no process data item involved) or a threefold mapping between controller variable and Safety PLC variable and process datum.Alternatively, right-click the table line and select the appropriate 'Disconnect Variable Safety PLC' command.
|
 | Disconnect all roles from each other (in all selected table rows).The command is available in all Data Lists for variables which are connected to at least one other role. It is also useable for multiple mappings (e.g., threefold mapping between controller variable and Safety PLC variable and process datum).Alternatively, right-click the table line and select the appropriate 'Disconnect Variable Safety PLC' command.
|
 | Variables that are no longer needed in a Data List can be removed via the command 'Remove all unused global Variables'. This command is separately available for variables of the controller and the Safety PLC. |
Note
All modifications on the Data List configuration are immediately applied to all other locations (Data Lists) where the corresponding variable/process data item/HMI tag is listed. |
Manual confirmation of modified safety-related I/O variable
The Data List of the Safety PLC provides a 'Confirm' flag for each safety-related variable. This flag is active and must be selected under the following circumstances:
- Each time, you assign a process data item to a safety-related variable thus defining a safety-related input or output variable.
- Each time a process data item which is assigned to a safety-related variable was modified in the PLANT.
Unintended equipment operation
- Inspect and correct as necessary any global I/O variables related to physical, safety-related I/Os whenever you modify the PLANT structure.
- Whenever you add, delete or exchange devices in the PLANT, validate the physical wiring of your safety-related architecture and thoroughly test the application.
|
- Double-click the Safety PLC icon in the PLANT and open its Data List in the editors area.
- Select the checkbox to confirm the assigned/modified process data item.
The 'Confirm' flag is automatically deselected after replacing a safety-related module. In this case, you must repeat the I/O verification and set 'Confirm' again for the affected variables. Observe the hazard message and information given in the topic "Replacing Devices", section "Safety requirements when replacing the Safety PLC...".
How to add/remove an HMI tag for a global variable in the Data List of the 'IEC 61131-3' node, 'Safety PLC' node, or controller node
- To add an HMI tag and assign it to a global variable ('Global' declaration) or an instance-related I/O variable ('Instance' or 'Program' declaration) at the same time, select the corresponding variable in the respective 'Data List' and click the 'Add a new HMI Tag' button on the 'Data List' toolbar. Alternatively, select 'Add HMI Tag' from the variable's context menu. The command is only available for variables which have no HMI tag assigned.
Note
Currently, no direct assignments to HMI tags are possible in the Safety PLC Data List. However, HMI tags can be created for exchange variables (Safety PLC standard variable assigned to a controller variable). |
The name of the new HMI tag is derived from the variable name and can be modified (see step 2).
- If desired, edit the default HMI tag name by clicking into the table cell and entering the desired name. The 'Function' field can be used to enter a descriptive text for the HMI tag.
- To declare the HMI tag as read-only, activate the 'Read Only' checkbox. A read-only HMI tag may only be read and not written in the HMI page.
Note
All modifications on the HMI configuration are immediately applied to all other locations where the corresponding HMI tag is listed. |
Further Info
HMI tags can also be assigned to global IEC variables ('Global' declaration) or instance-related I/O variables ('Instance' or 'Program' declaration) in the HMI editor. For detailed information, refer to the topic "". |
 | To remove an HMI tag from a global IEC variable, right-click the variable and select 'Remove HMI Tag'. Alternatively, select the variable and click the 'Delete HMI Tag' button on the 'Data List' toolbar.
Note
When you remove an HMI tag in the 'Data List' table from a variable and the variable is connected to a dynamic property of an HMI object, a corresponding error message is reported in the message window. Double-clicking the message opens the HMI page with the respective HMI object in the editors area. To remove the error, either delete the linkage between variable and dynamic property or assign another variable to the property. |
|