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 :
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 :
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 :
I have no idea what is the device referred by the message.
Once acknowledged, the Messages window shows the following errors :
Thanks for your assistance
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.
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 :
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.
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?
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.
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.
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.
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 ?
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.
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.
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.
Hello,
this is possible, see screenshot,
add
Canbus
CANopenManager
CANopenSlaves (via Eds files)
mfg
Edi
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.
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!
Hi,
could you give a screenshot from your device tree?
BR
Edwin
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
Hi,
which plc are you using?
BR
Edwin
Hi all,
I have a problem using Codesys running whareouse using Sycon comunication system.
help me please.
Here the problem.
Thank you.
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
Thank you. In this way the symbols of external modules turn green when you go running ?
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
I'm using the Codesys RTE V3. I've attached a screen shot of my Codesys.
@angelc90
You need to uncommend the two lines in the Codesyscontrol.cfg where the firmware is loaded in the Hilschercifx section
BR
plcmax
@AlexWheeler check the plc logger for more infomation
BR
plcmax
@plcmax
which row I have to uncomment?
Thank you.