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 v3 and CoE devices from Beckhoff

ocochelin
2011-10-05
2016-10-18
1 2 > >> (Page 1 of 2)
  • ocochelin - 2011-10-05

    Hello,

    I am trying to control CANOpen slave devices using CoDeSys v3 and Beckhoff devices.
    The hardware connection is the following :
    Standard PC with CoDeSys v3 <-> 1Gbps Ethernet Adapter <-> EtherCat Coupler EK1100 <-> CANOpen master terminal EL6751 <-> CANopen slave devices
    I managed to import the EtherCat XML device description of the coupler and the EDS file of the CANOpen master terminal.
    Doing so, I have been able insert the devices in my project.

    Once the gateway/target selected (CoDeSys Control RTE V3), I get an error when trying to login.
    First, the following message box is displayed :

    Error during download:
    8 unresolved 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
    

    I have no idea what is the device referred by the message.
    Once acknowledged, the Messages window shows the following errors :

    Unresolved reference: 'CLOSEETHERNET'
    Unresolved reference: 'GETNUMBEROF ADAPTERS'
    Unresolved reference: 'GETADAPTERINFO'
    Unresolved reference: 'OPENETHERNET'
    Unresolved reference: 'SENDETHFRAME'
    Unresolved reference: 'GETETHFRAME'
    Unresolved reference: 'SENDIPETHFRAME'
    Unresolved reference: 'GETIPETHFRAME'
    

    Thanks for your assistance

     
  • spfeif - 2011-10-05

    The first one is the firmware version of the target of the physical device is different than the target (PLC in CodeSys) Typically you have to either update the firmware in the device or if the device is newer than the CoDeSys target update the CoDeSys target.

    Unresolved is typically an issue with libraries. You may have to make sure these libraries are found and that you may have to use the fully qualified name of the FB using the NameSpace.

     
  • ocochelin - 2011-10-05

    Hi Steve, thanks for your answer.

    I don't understand how the firmware version of the target of the physical device could be different from the PLC target, given the target is the CoDeSys Control RTE that has been installed on the local computer with CoDeSys.
    The target version displayed my the gateway description is : 3.4.4.10

    Do you think the error might be caused by a problem with library versions ?
    Here is the list of libraries referenced by the project :

    [Grayed] IoStandard, 3.4.2.0 (System)Β  - Effective version: 3.4.2.0
    Standard, 3.4.4.0 (System)Β  - Effective version: 3.4.4.0
    [Grayed] IeSfc = IeSfc, 3.4.2.0 (System)Β  - Effective version: 3.4.2.0
    [Grayed] IODrvEtherCAT = IODrvEtherCAT, 3.4.4.10 (3S - Smat Software Solutions GmbH)Β  - Effective version: 3.4.4.10
    [Grayed] EL6751_CANMiniDriver = EL6751_CANMiniDriver, 3.4.2.0 (3S - Smat Software Solutions GmbH)Β  - Effective version: 3.4.2.0
    [Grayed] IODrvEtherCAT = IODrvEtherCAT, 3.4.4.0 (3S - Smat Software Solutions GmbH)Β  - Effective version: 3.4.4.0
    CAA CiA 405, 3.4.4.0 (CAA Technical Workgroup)Β  - Effective version: 3.4.4.0
    

    How can firmware or Codesys target be updated - as you suggest - in my scenario ?

    Regarding the unresolved references issues I want make it clear that the error appears at login time. At build time, everything works properly with no error.

     
  • spfeif - 2011-10-05

    Yes I have had the same errors at login. I thought my solution was fully qualified paths. It's been a while.

    Never used CoDeSys as softPLC from a PC. But that is typically the error you get when you install on a target. Is it an older program then you updated CoDeSys? The soft runtime still has a version number? And there is still a target that you have to select the SpRuntime in CoDeSys. They must not match?

     
  • TimvH

    TimvH - 2011-10-05

    As the RTE is a realtime PLC, it needs a realtime driver.
    You need to specify exactly which driver the RTE should use.
    This depends on your Ethernet Chipset in your PC.
    CoDeSys supports the Realtek and Intel chipsets.

    You should go to the RTE folder and open the .cfg file. In this file you will find the specific components which should be loaded when the RTE starts up. Without the correct driver, the RTE also doesn't load the external libraries.

    The errors you get come from the RTE which informs the Programming tool that these libraries are not loaded by the RTE.

    When you build the application CoDeSys doesn't know about the external libraries yet which are loaded and therefore you don't get a compile error.

    Just to test your application you might consider first to use the Control Win V3. This automatically loads a Windows driver (not realtime) which can access your specified Ethernet interface (select correct MAC adres in the EtherCAT I/O configuration).
    The only thing you have to do is right click on your Device (Control RTE), choose update device and choose the Control Win V3.
    This should offcourse also be started to work correctly.

     
  • ocochelin - 2011-10-06

    I switched the target to CoDeSys Control Win and this partially solved the problem.
    Now, when I try to login I still get unresolved reference errors (4 errors) but they now refer to EL5761 and no longer to Ethernet or EtherCAT.

    Nevertheless, if I keep only the EtherCAT master and EL1100 devices in my project and then login, a warning flag appears on these devices and their status indicates that they are not running.
    Am I missing an EtherCAT driver or something else ? How could I get more details about this error ?

    For your information, when I "Scan devices" on the EtherCAT master, the EL1100 coupler is found. Does this allow me to conclude that the EtherCAT protocol is properly working ? Or device scanning doesn't rely on EtherCAT protocol ?
    The EL5761 is also detected by the scan but as an unknown device.

     
  • TimvH

    TimvH - 2011-10-06

    When you scan for devices and find one or more nodes, it definately means your EtherCAT stack is working correctly.
    Now the question is why your EL5761 is not recognized. You either don't have the correct .xml file installed, or it is not matching exactly it's configuration.
    Does this node need to be configured by any other (Beckhoff) software first?

    A workaround could be to use a CAN PCI card (from PEAK) in your PC to directly access your CAN I/O.

     
  • ocochelin - 2011-10-06

    Thank you for your answer.

    We finally solved the EL6751 "unresolved reference" issue. We were missing the EtherCAT XML Device Description for this device. That's why the device could be detected but not recognized when scanning.

    However, we are still stuck. When we login, the EtherCAT master and all its children display a warning (yellow triangle) and the status indicates :
    EtherCAT protocol : Not running

    Do you have any idea ?
    Should I add a protocol to my network adapter through the Windows properties dialog ?
    Is there a document that explains step by step the procedure to follow ?

     
  • TimvH

    TimvH - 2011-10-06

    If it is not running at all you get to see red triangles.
    When it is working correctly you see green symbols.

    The yellow colour indicates that it is running in demo mode.
    It should be working, but you have no valid runtime license yet and therefor your PLC will stop after 2 hours.

    When you restart it, it should work again for 2 hours.

    What could be the reason that it is not working, is that you have not used any variables in your application.
    The easiest way to check your I/O is check the option "always update variables" in all your I/O tabs.

    Then the I/O driver will also update variables which are not used in the application.

     
  • ocochelin - 2011-10-06

    You were right. Everything was OK, we just had not been running the application.
    Indeed, provided the Ethercat Master is run as a PLC task (versus an invisible driver) the EtherCAT is unavailable as long as the application is stopped. Now, everything seems to be ok on the EtherCAT side.

    But I am now facing a new problem.
    With the EL6751 acting as a CANopen master, I wanted to add my CANopen slave nodes. But when I try to add a device on my EL6751 CANopen master, a single EtherCAT device (something like COMP from Beckhoff) is displayed in the choice list. Instead, I expected a list af CANopen slaves to be displayed.

    Do you know how I can work around this?

    Thank you for answering my newcomer questions.

     
  • TimvH

    TimvH - 2011-10-07

    Actually I doubt whether this is supported.
    As far as I know it is only possible to add EtherCAT devices in the EtherCAT configuration.
    Can you configure the EtherCAT/CAN device in some other way?

    If this is not possible, I see as only solution to use a CAN PCI card in your PC and access the CAN I/O directly.

     
  • eschwellinger

    eschwellinger - 2011-10-14

    Hello,

    this is possible, see screenshot,
    add
    Canbus
    CANopenManager
    CANopenSlaves (via Eds files)
    mfg
    Edi

    IMG: Devicetree.jpg

     
  • ocochelin - 2011-10-14

    Hi Edwin,

    Indeed, we get it working in the meantime.
    The EL6751 must be added as a "CAN Minidriver" instead of a "CANopen master".
    After that, you get a CAN bus on which you can add a CAnopen manager and then scan for slaves.

    Thanks for your help.

     
  • Mando - 2016-05-13

    ocochelin hat geschrieben:
    You were right. Everything was OK, we just had not been running the application.
    Indeed, provided the Ethercat Master is run as a PLC task (versus an invisible driver) the EtherCAT is unavailable as long as the application is stopped. Now, everything seems to be ok on the EtherCAT side.

    Hi! So following the steps on this post, I'm stuck in the yellow triangles! What exactly did you do to fix it?

    Thank you!

     
  • eschwellinger

    eschwellinger - 2016-05-14

    Hi,
    could you give a screenshot from your device tree?

    BR
    Edwin

     
  • AlexWheeler - 2016-05-24

    Hi, I'm attempting a similar set up as the original poster.

    Codesys -> Beckhoff EK1100 -> Beckhoff EL6751 -> Copley Xenus Amplifier (XSL-230-18)

    I was also able to load config files for the two Beckhoff modules, which were found by codesys. Then under the EL6751_CanMiniDriver (8 messages) I added a CANopen_Manager_SoftMotion and under that I added the Copley Accelnet device using their eds.

    My questions are:
    1. Why do I get "Identifier 'EL6751_CANMiniDriver' not defined" and "'EL6751_CANMiniDriver' is no component of 'EL6751_CANMiniDriver'" precompile errors. I got the MiniDriver device from the device repositiory which was loaded using files from beckhoff.
    2. The eds file for my Xenus amplifier shows up as an Accelnet Device and not an Axis_ref. It is a Can DSP 402 compatible amplifier and I wish to control it from a gcode file but I need an axis_ref object to use with the SMC_Interpolator and SMC_ControlAxisByPos. How can I get this?

    Regards,
    Alex

     
  • eschwellinger

    eschwellinger - 2016-05-24

    Hi,
    which plc are you using?
    BR
    Edwin

     
  • angelc90 - 2016-05-24

    Hi all,
    I have a problem using Codesys running whareouse using Sycon comunication system.
    help me please.
    Here the problem.
    Thank you.

    IMG: err_codesys.png

     
  • eschwellinger

    eschwellinger - 2016-05-25

    Hi,

    you need to change the following settings in:

    C:\Program Files\3S CODESYS\CODESYS Control RTE3\CODESYSControl.cfg

    [ComponentManager]
    Component.1=CmpDrvSchedulerAMP
    Component.2=CmpCodeMeter
    Component.3=CmpHilscherCIFX

    additional change the device driver in Windows device Manager (replace the hilscher Driver)
    to this Driver located here C:\Program Files\3S CODESYS\CODESYS Control RTE3\SysDrv3S
    for the Hilscher Cifx Card.

    Sycon is not needed everything is setup/configured by the configuration in CODESYS.
    BR
    Edwin

     
  • angelc90 - 2016-05-25

    Thank you. In this way the symbols of external modules turn green when you go running ?

     
  • angelc90 - 2016-05-25

    Hi all,
    I have set this component:

    [ComponentManager]
    Component.1=CmpDrvSchedulerAMP
    Component.2=CmpCodeMeter
    ;Component.3=CmpSJACanDrv
    ;Component.3=CmpEt100Drv
    ;Component.3=CmpEt1000Drv
    ;Component.3=CmpRTL81x9Mpd
    ;Component.3=CmpRTL8169Mpd
    Component.3=CmpHilscherCIFX <---
    ;Component.3=CmpSercos3Master

    there is still the problem.

    Help me please.
    Thank you

    IMG: codesys conf.png

     
  • AlexWheeler - 2016-05-25

    I'm using the Codesys RTE V3. I've attached a screen shot of my Codesys.

    IMG: CodesysSetup.jpg

     
  • plcmax - 2016-05-26

    @angelc90
    You need to uncommend the two lines in the Codesyscontrol.cfg where the firmware is loaded in the Hilschercifx section
    BR
    plcmax

     
  • plcmax - 2016-05-26

    @AlexWheeler check the plc logger for more infomation
    BR
    plcmax

     
  • angelc90 - 2016-05-26

    @plcmax
    which row I have to uncomment?
    Thank you.

    IMG: cod.png

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.