Tab ‘<device> I/O Mapping’¶
On this tab of the generic device editor you carry out the mapping of the input, output and memory addresses of the control device to the variables of the application. In this way you create the so-called ‘I/O mapping’.
The application that is to take care of the I/O handling is defined on the tab PLC settings.
Note
You can use the ‘online configuration mode’ if the device supports it. In this mode you can access the I/Os of the hardware without having to load a real application to the device beforehand.
Note
You can also create the I/O mapping in the Edit I/O mapping dialog box where you obtain a mapping list with search and filter functions for a complete device tree.
Attention
:strong:Mapping ‘too large’ data types
If a variable of a data type that is larger than a byte is mapped to a byte address, the value of the variable will be truncated to byte size there! For monitoring the variable value in the I/O Mapping dialog box, this means the following: In the root element of the address, the value is displayed that the variable currently has in the project. The current individual bit values of the byte are displayed in succession in the bit elements below that, but this may not be sufficient for the entire variable value.
Example of the tab I/O mapping for a CAN bus slave:
The tab contains a table for the editing of the I/O mapping. The information displayed for the inputs and outputs originates from the device description.
Find (1) | Input field for a search string for the mapping table. The search results are marked in yellow. |
Filter (2) | Drop-down list for filtering I/O assignments displayed listed in the mapping table:
|
Variable | Depending on the device, the inputs and outputs of the device appear as nodes and below them, indented, the associated channels or, depending on the device, only the implicitly created device instance. The symbol indicates the type of channel:
A double-click on the cell opens an input field.
|
Mapping (3) | Type of mapping:
|
Channel (4) | Symbolic name of the channel. |
Address (5) | Address of the channel, for example Address strikethrough: indicates that you should not assign any further variables to this address. Reason: Although the variable specified here – as an already existing variable – is managed at a different memory location, ambiguities could result during the writing of the values, particularly with outputs.
|
Type (6) | Data type of the channel, for example Structures or bit fields defined in the device description are displayed only if they are part of the IEC standard and are identified as IEC data types in the device description. Otherwise the table cell remains empty. When mapping structured variables, the editor prevents you from entering both the structure variable (example: |
Default value | Default value of the parameter that applies to the channel Appears only if the option Set all outputs to default value is activated in the PLC settings for the behavior of the outputs at stop. |
Unit (7) | Unit for the parameter value, for example ms for milliseconds. |
Description (8) | Brief description of the parameter. |
Current Value | Actual value of the parameter applied to the channel; appears only in online mode. |
Reset mapping (9) | CODESYS resets the mapping settings to the default values defined by the device description file. |
Refresh variables (10) | Definition for the device object about updating I/O variables. The default value is defined in the device description.
|
This part of the dialog box appears only in the case of the implicit creation of an instance of the device object that can be accessed in the application. This can be used, for example, in order to restart a bus or to query information. Whether such an instance is available and how it can be used depends on the type of device. Please refer here to the online help for the special device configuration. |
Note
If a UNION is represented by I/O channels in the mapping dialog box, it depends on the device whether mapping to the root element is also possible.
See also