04-07-2014 09:47 AM - edited 04-07-2014 09:50 AM
Hello,
this is my first try to use a Beckhoff EtherCat Coppler EK1100 with an PC and LabView! So sorry for my stupid Questions 😄
I have a Beckhoff EK1100 EtherCat Coppler with 2 EL3008 Moduls. I want to read the Values from the Channels with an Cycle Time of 1second in LabView. I use LabView 2010SP1 and Win7. I have installed the EtherCat Driver from NI. I like to use the Connection with the NET. Its looks easiere than the Dll Version 😄
In the TwinCat Software I create a new config for the Coppler. There i can read the Values of the Channels. I also create a new Task where i have , for testing purpose, add 2 Variables.
Now i try to read the Values in LabView. And there is my problem. The Code samples for the Beckhoff Webside doesn't work (sample). I change the Port, i also change the Address of the Groups and Offset to the Values shown in the TwinCat Software. But i always get a "TwinCAT.Ads.AdsErrorException".
Now i try to create a new LabView Project with a new Hardware like in this tutorial ( Beckhoff EK1100 with LabView ).
I can create this configuration, but it is alway offline. I enter a valid IP-Address, but i cant conect to the EK1100 but i cant scan the Device or go online with this.
How can i read this variables in LabView? I could be so complicated, but i have no idea how i have to start. Maybe somebody can give me a hint or a link to a tutorial or maybe a working code sample.
Thx for your help
Solved! Go to Solution.
04-07-2014 10:34 AM
Hi 4711,
Do you have an real-time target hooked up? The NI ethercat driver only runs on RT. If you were using twincat you would connect directly to the 1100, with LV you cannot.
However, you should be able to call the twincat ADS api from labview. There are examples here that might help: http://infosys.beckhoff.com/italiano.php?content=../content/1040/TcAdsComLib/HTML/TcAdsComLib_Intro....
04-08-2014 01:08 AM - edited 04-08-2014 01:33 AM
Hello Jesse_D,
no, i have no real-time target. I only use the EK1100 as an EtherCat Slave. The PC should be my master device. I tought that i could use it like an USB Modul 😄 It is possible?
I have 2x EL3008 Analog Input Modules and i only want to measure some voltages. In the next step i want to use a EL4038 for voltage output. But one step at a time 😄
And thanks for this link. I will have a look at it.
greedings,
Arno
Edit:
I know the side in the link. The examples doesnt work on my pc
04-08-2014 06:08 AM
Hello,
it works!! I retried the example from Beckhoff. One failure was, that in the example, the Value was 32bit but in my case, it is a 16bit. So that was one reason for an an Exception. But the "big" problem is, i dont know where exactly the failure was! Maybe on the IP Address of the Slave, or an failure in the Group or Offset ID. I tried different kinds of Values and i change some parts of the program code.
But, i can read an Voltage from Channel1 of theEL3008 Modul. Now i try to write some Values and read some Data in Arrays.
And i found out, that i dont need the real-time Part, because i have not real-time device. My "real-time"device is the pc.
@ Jesse_D: Thanks for help, your answer was a good advice!
Arno
09-28-2017 11:34 AM
Can you send the code ? I will try it.
Thanks.
03-27-2019 10:24 AM - edited 03-27-2019 10:41 AM
Hi,
i've also Problems with the connectivity between LabVIEW and the Beckhoff EK1100. How does it works without the RT packet? Pleas give us a hint. Thanks in advance.
I've a 64-Bit LabVIEW Version running on my system. I can controll my Beckhoff ports (EL1014 & EL2004) with the TwinCAT 3. So I believe that the EtherCAT comunication works.
03-27-2019 11:01 AM
03-28-2019 04:38 AM - edited 03-28-2019 04:42 AM
Big thanks for your help. This is the example we're talking about, or?
Where should I enter the NetId?
Why I need the TwinCAT Software License?
And what About the ADS Port they entert in the example? The port 801 is for the PLC. I found a listing for ADS Ports on the Beckhoff HP.
Is 300 the right one for me?
I don't know where I have to fill in my port 11?
When I start my programm I get two errors.
I made two Pictures.. please have a look.
03-28-2019 05:42 AM
The LabVIEW support offers me the products from
http://www.ackermann-automation.de/index.htm
that's a german Company who sells Add-ons for the communication between Beckhoff/EtherCAT and LabVIEW. It's somthing around 500€.
04-02-2019 05:07 PM
Hi Herrx,
I was struggling with the same issue. I will give you some suggestions how I solve the Beckhoff EK1100 LabVIEW adventure
Beckhoff provides three kinds of API, named TwinCAT ADS:
i) DLL
ii) OCX
iii) .NET
User4711 suggest you to do it with OCX as he describes in his screenshot.
I have attached a VI that set a digital output of EL2004 and a screenshot of TwinCAT3 where you find the related parameters.
Be aware of the hex coded values for group (IGrp, nIndexGroup) and offset (IOffs, nIndexOffset)!!!
If you figure out the parameter of your I/O task under ADS Info you have to select the right AdsOcx invoke node.
For this it is important to check the Type, see TwinCAT3 screenshot.
Here https://infosys.beckhoff.de/ all uesd datatypes are explained.
Where should I enter the NetId?
It is not necessary if TwinCAT runs.
And what About the ADS Port they entert in the example? The port 801 is for the PLC. I found a listing for ADS Ports on the Beckhoff HP.
You have to use the port that is mentioned in ADS Info.
I don't know where I have to fill in my port 11?
Set the port number in AdsAmsServerPort of AdsOcx property node at startup.
Regards,
MOJO