Project Conversion with Application of Locally Connected I/O Modules
In the example below a project with a node consisting of a PFC200 and linked I/O modules is applied to CODESYS by e!COCKPIT. This does not involve a special fieldbus, but only the application of the locally connected I/O modules.
The I/O modules are displayed with the following designations in the device structure:
The channels of each I/O module are mapped as global variables in e!COCKPIT. These variables can be named by direct input, or allocated using mapping.
- In e!COCKPIT right-click on the PFC200 and select [Export] in the contextual menu.
- A CSV file with I/O mapping containing the allocation between global variables and I/O modules is then exported.
- Save the e!COCKPIT project.
- Make a backup copy of your project in case data is lost during conversion.
- Change your e!COCKPIT project’s file extension from *.ecp to *.project.
- Double-click on the project file (*.project) to open the CODESYS project.
- The project appears in the device tree.
The “Project Environment” dialog also opens. This dialog shows all the project components for which a newer version is available. - Click on [Set all to Newest] and then click [OK].
- Red circles with a question mark in the device tree indicate that device descriptions need to be updated. First, update the PCF200.
To do this, right-click on the PFC200 and select [Update device...]. - Select the PFC200 from the list and confirm with [Update device].
- Update the individual I/O modules the same way. The selection dialog can remain open during this process. Each I/O module that is marked will be edited.
- The filter field can provide quick assistance when searching for I/O modules.
- As you can see, the I/O module designations from the import are retained in this procedure.
If you have already modified standard designations for I/O modules in e!COCKPIT for a specific project, these modified names will also be applied. - As a comparison: When generating new I/O modules (with no import), other names would be assigned:
_750_1405 (750-1405)
_750_1505 (750-1505)
_750_469_16 (750-469#16)
_750_597_16 (750-597#16)
In this case, it would not be possible to allocate the I/O module variables from e!COCKPIT to those in CODESYS from a CSV file import. These names must be the same. - Now, import the CSV file containing the I/O mapping and the variable names from the e!COCKPIT project. To do this, right-click on “Kbus (Kbus)” and in the contextual menu select “Import I/O mapping from CSV ...”.
- Check to ensure that the I/O module data points and their naming through CSV import have been applied. Double-click on the corresponding I/O module to do this.