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.

Node in the detail view in e!COCKPIT
Node in the detail view in e!COCKPIT

The I/O modules are displayed with the following designations in the device structure:

Designation of I/O modules in e!COCKPIT
Designation of I/O modules in e!COCKPIT

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.

Global Variables for an I/O Module
Global Variables for an I/O Module
  1. In e!COCKPIT right-click on the PFC200 and select [Export] in the contextual menu.
  2. A CSV file with I/O mapping containing the allocation between global variables and I/O modules is then exported.
  3. Exporting I/O mapping
  4. Save the e!COCKPIT project.
  5. Make a backup copy of your project in case data is lost during conversion.
  6. Change your e!COCKPIT project’s file extension from *.ecp to *.project.
  7. Double-click on the project file (*.project) to open the CODESYS project.
  8. 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.
  9. Click on [Set all to Newest] and then click [OK].
  10. Updating project environment
  11. 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...].
  12. Select the PFC200 from the list and confirm with [Update device].
  13. Selecting PFC200
  14. 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.
  15. Updating I/O Modules
  16. Selecting I/O Modules
  17. The filter field can provide quick assistance when searching for I/O modules.
  18. Selecting I/O Modules Using the Filter
  19. 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.
  20. Designation of I/O Modules
  21. 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.
  22. 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 ...”.
  23. Import I/O mapping
  24. 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.
  25. Naming of variables after CSV import