Codesys Control RTE V3 - Network Adapter configuration for Ethercat real time bus

1.6k Views Asked by At

I am quite new to the Codesys platform and I am experiencing some problems when trying to use the RTE on a Windows IPC as a target device.

I am using an IPC (Windows 7 Embedded) with the following runtime version -> CODESYS Control RTE V3 v3.5.17.0

I run the Codesys Environment in my laptop (Also version v3.5.17.0) and I connect to the IPC runtime without problems, by choosing the right target PLC device (CODESYS Control RTE V3 x64).

I add an "Ethercat Master SoftMotion" device to my project and assign the correspoding IEC task (Bus Cycle Task) in which the stack will run, and select the NIC to be used by the stack without major problems. Just as described in the documentation -> https://help.codesys.com/webapp/_ecat_tutorial;product=core_EtherCAT_Configuration_Editor;version=4.1.0.0

When I Log In and Download the project so that I could start scanning the network to find the different Ethercat Slaves, I get the following messages:

  • [FATAL ERROR] Unresolved reference: 'SYSETHERNETADAPTERCLOSE'
  • [FATAL ERROR] Unresolved reference: 'GETNUMBEROFADAPTERS'
  • [FATAL ERROR] Unresolved reference: 'GETADAPTERINFO'
  • [FATAL ERROR] Unresolved reference: 'SYSETHERNETADAPTEROPEN'
  • [FATAL ERROR] Unresolved reference: 'SYSETHERNETETHFRAMESEND'
  • [FATAL ERROR] Unresolved reference: 'SYSETHERNETETHFRAMERECEIVE'
  • [FATAL ERROR] Unresolved reference: 'SYSETHERNETFRAMERELEASE'
  • [FATAL ERROR] Unresolved reference: 'GETIPETHFRAME'
  • [FATAL ERROR] Unresolved reference: 'SYSETHERNETIPFRAMESEND'
  • [FATAL ERROR] Unresolved reference: 'SYSETHERNETIPFRAMERECEIVE'

I also get I dialogue box stating:

"Error during download: 10 unserolved reference(s), 0 signature mismatch(es), 0 version mismatch(es) found

The device version on the hardware seems to be different from the device version used in the project. Try to up-/downgrade the device in the project to match the actual version of the hardware.

Please take a look in the messages view for further details".

This error message seems misleading because this is a new project on a new installed environment where both Codesys Development and the runtime both have exactly the same version and the project is therefore created for the right version of the runtime.


I had a look at the manual and I have to select the proper driver -> https://help.codesys.com/webapp/_cds_rtev3_startup_cifx_hil;product=core_codesys_control;version=3.5.17.0

At this point is when I find the problems:

  • According to the documentation I need to add the CmpHilscherCIFX component in the Component Manager Tab of the PLC Configuration which I did and then restarted the IPC.

  • Later on, the bootloader and correct firmware must be chosen by modifying the "CODESYSControl.cfg" file. This is a step I also do as you can see in the attachments, I simply add the Ethercat select the Ethercat firmware file according to "_cifX firmware.txt" which I found in "C:\Program Files\CODESYS\CODESYS Control RTE3\HilscherCIFX\Firmware":

[CmpHilscherCIFX]
TraceLevel=0xFFFFFFFF
InterruptMode=0
DMAMode=1
Device.0.BootloaderFilePath=$Firmware$\HilscherCIFX\Firmware\NETX100-BSL.bin 
Device.0.Channel.0.FirmwareFile=$Firmware$\HilscherCIFX\Firmware\cifxecm.nxf

[SysFile]
|PlcLogicPrefix=1
PlaceholderFilePath=C:\Program Files\CODESYS\CODESYS Control RTE3, $Firmware$

After applying these changes, I restarted the IPC again. However, I was still getting this Unresolved reference errors, I noticed that there wasn´t any Ethercat firmware file (cifxecm.nxf) in "C:\Program Files\CODESYS\CODESYS Control RTE3\HilscherCIFX\Firmware":


The chosen NIC to run the Ethercat stack on the IPC is an Intel I211, so in theory the Chipset is supported.

How is this possible? I am not sure this is the cause of my problems, but it definitely seems something strange. Also the documentation does not seem to be up to date with the version I am using of the runtime, which I believe is onw of the latest.

I hope someone has some suggestion and if you need further clarification, I will provide more details.

1

There are 1 best solutions below

3
On

It seems I was following the wrong part of the documentation, since I am not using a HilscherCIFX card.

The solution is explained in the section Available Dynamic Components.

Basically I had to:

  • Revert the changes I applied, those explained in my previous post.
  • Make sure secureboot is disabled in the BIOS settings, (this can be done during the installation of the RTE runtime).
  • I had to install the right Codesys Driver for the Intel I211 NIC which is "CmpEt1000Drv" as described in the documentation. The driver is in "C:\Program Files\CODESYS\CODESYS Control RTE3\Cmpet1000MPD". Personally, uninstalling the previous driver from the NIC I wanted to use for Ethercat from the Windows Device manager and installing the new one from there was enough for me.
  • Add the CmpEt1000Drv component to the component list (Component Manager tab) of RTE System Configuration.
  • Stop and then Restart the RTE environment.