Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Beckhoff EK1100 - Newbie

Solved!
Go to solution

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

 

 

0 Kudos
Message 1 of 11
(17,154 Views)

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....

 

 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 2 of 11
(17,146 Views)

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 Smiley Sad

0 Kudos
Message 3 of 11
(17,138 Views)
Solution
Accepted by topic author User4711

Hello,

 

it works!! Smiley Happy 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

0 Kudos
Message 4 of 11
(17,130 Views)

Can you send the code ? I will try it.

Thanks.

0 Kudos
Message 5 of 11
(11,577 Views)

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. 

 

 

0 Kudos
Message 6 of 11
(9,473 Views)
Hi, how you can see in the picture, you have to click on the channel, you will read data from, or write data to. Under ADS Info you can see the IndexGroup and the Index Offset (in the Picture the values are different between Visual Studio and LabView, i dont have the actuel version on my pc). This Values and the Example from Beckhoff and it should work. I found an error in the example, but it could be fixed since then. Its some years ago. Be careful, you dont need the RT Package from LabView, but you need the TwinCat License!
0 Kudos
Message 7 of 11
(9,467 Views)

Big thanks for your help. This is the example we're talking about, or?

 

https://infosys.beckhoff.com/index.php?content=../content/1031/tcsample_labview/html/tcatadsnet_setu...

 

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.

 

https://infosys.beckhoff.com/index.php?content=../content/1031/tcadscommon/html/tcadscommon_identads...

 

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.

Download All
0 Kudos
Message 8 of 11
(9,450 Views)

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€.

0 Kudos
Message 9 of 11
(9,443 Views)

Hi Herrx,

 

I was struggling with the same issue. I will give you some suggestions how I solve the Beckhoff EK1100 LabVIEW adventure Cat LOL

 

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

Download All
0 Kudos
Message 10 of 11
(9,361 Views)