Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

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

ibarroso
2021-10-07
2021-10-07
  • ibarroso - 2021-10-07

    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.

     
  • i-campbell

    i-campbell - 2021-10-07

    HilscherCIFX is if you have a HilscherCIFX card, so this I think the stuff you did for HilscherCIFX was not neccessary and should be reverted.

    You want to:
    1. Disable secureboot from your BIOS.
    2. Install the CODESYS Driver for your intel card. I think install directory is something like C:\Program Files\CODESYS Control RTE3\. I211 is CmpEt1000Drv
    3. Add the CmpEt1000Drv component to your component list of RTE configuration
    4. Stop and then Start the RTE

     
  • ibarroso - 2021-10-07

    It turned out I was looking in the wrong part of the documentation. Thank you very much, it working now and finding my ethercat devices. You saved me a lot of time probably.

     

Log in to post a comment.