Project conversion using the example of CANopen
Initial state:
In this example, an e!COCKPIT project consisting of a PFC200 (750-8214) as the master with a connected CANopen coupler (750-337) as the slave is converted. For the coupler, a device description (EDS) has been installed in e!COCKPIT via the Backstage View > Product Catalog > [Import Device]. Three I/O modules are plugged into the coupler: a 4-channel digital input module (750-402), a 2-channel digital output module (750-501) and an 8-channel digital input module (750-449). A program using CAN variables is running on the PFC200.
In brief:
In the following description, you perform the following steps in CODESYS: You create a copy of the master device to back up the CANopen data. You then update the master device to the current CODESYS device description. The CANopen data (fieldbus, slave and variables) is lost. You now import the slave device via an EDS file. Then you recreate the structure from the CANbus and CANopen manager (master) in the device tree. You then copy the CANopen device (slave) of the device copy with the variables it still contains to under the newly created CANopen master.
- First create a copy of the controller in the device tree: Right-click on the controller and select Copy.
- Then right-click on the project name at the top of the device tree and select Insert.
- A copy of the controller has been created. You will use the CANopen data of the copy later.
- Now swap the e!COCKPIT device description of the original device that it still contains and the CODESYS device description. To do so, right-click on the device and select Update Device....
- Select your device – in this case, the 750-8214 device – under “Controllers (PFC)” and click [Update Device].
- The device is updated. In the device tree, the red question mark symbol disappears. However, the substructures with CANopen device and CANopen data are also deleted.
- Restore the configuration. For this, the EDS file of the CANopen slave must be installed (see Installing WAGO Device Descriptions separately).
- Now recreate the CANopen structure of your project. In the device tree, right-click on your device and select Insert Device....
- First select the CANbus, click on the empty item below it and select the “WAGO CANopen Manager” in the same way using “Plug Device.”
- Now copy the CANopen device (750-337) from the CANopen device you backed up at the beginning and re-insert it under the newly created “WAGO CANopen Manager” (you can also drag and drop it).
- Delete the device that was copied at the beginning. You can use all the variables in the new device as usual.