From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

beckhoff ethercat: Are there NI drivers for this?

: Hi,

 

I am currently communicating with a Beckhoff EtherCAT system through their own software (TwinCAT). In there, you can make an activeX coupling, which you can read and write through labview.

 

This works fine, however its not particularly fast. So I'm looking for a labview ethercat driver I can use directly with LV, and of course I need to see a manual on how to send and read data.

Is this available?

 

Thanks

 

Message 1 of 21
(13,405 Views)
0 Kudos
Message 2 of 21
(13,397 Views)

As a matter of fact, I had not.

 

But this leaves me with even more questions, what is a  NI 9144 chassis?

Also, this short article pointed out that I should couple the Twincat software to labview, this is something

I am looking for to bypass.

 

I have a Beckhoff Ethercat, which has several slave modules attached, such as digital in/out (valve control), analog in and out (flowmeters and pumps).

 

In the most optimal way, I would like to control these directly from LV, and I have no clue how to still 🙂



0 Kudos
Message 3 of 21
(13,386 Views)

It sounds like your familiar with LabVIEW at some level. NI uses EtherCAT to extend to 9144 chassis from our LabVIEW RT target platforms right now. That means Ethercat master support is only available for NI RT hardware targets or non NI RT desktop PCs. The support includes non NI slaves like Beckhoff I/O.

For you that means you need one of the RT hardware targets that has a second ethernet port to work as a dedicated EtherCAT master, LabVIEW RT to target the hardware and some software like NI-RIO and NI Ind Com for EtherCAT that comes as a free download from NI web pages. If you go to NIs webpage and navigate to "DeveloperZone" search for "ethercat" and you find some more help like this page.

 

DirkW

Message 4 of 21
(13,374 Views)

I have a beckhoff PCI Ethernet card that is real-time, and has their drivers. Will this suffice?

What should I do next suppose I install the PCI card and the drivers. I have XML files from Beckhoff for the 1100 series Ethercat I have. I have been told here you can find

what packets of data belong where.

 

I have no clue what else to do. I am experienced labview programmer, but I have little knowledge of this, but it is very interesting 🙂

 

Thanks for the support! ! !

 

0 Kudos
Message 5 of 21
(13,351 Views)

Hello Guys,

 

DirkW you are right, to communicate directly to a EtherCAT slave you need the following set-up:

 

Copied from the Helpfile of the NI-Industrial Communications for EtherCAT:

 

First, build your EtherCAT network by connecting the following hardware items:

  • Host—A desktop or laptop running Windows and LabVIEW. You use the host to configure the real-time controller and EtherCAT slave devices.
  • Real-time controller—An NI-Industrial Communications for EtherCAT-supported controller. The controller has two Ethernet ports:
    • Port 1 is for communication between the host and controller via TCP/IP.
    • Port 2 is exclusively for EtherCAT communication between the EtherCAT master and EtherCAT slave devices. Port 2 is referred to as the EtherCAT port.
  • EtherCAT slave device—EtherCAT slave devices from National Instruments and other vendors.

You can build the EtherCAT network with the supported controllers. The following is a typical EtherCAT network:

 

20207i419A80FB105655FF

 

Regards,

 

Casper

Message 6 of 21
(13,294 Views)

I have been looking into this issue recently as I deal with a lot of Beckhoff as well as NI I/O.  I was looking at 2 ways of hooking into TwinCAT's data.  The first is activex, which is probably quite slow, as you mentioned.  So I was looking around for some other method and I found this dll on Beckhoff's website, which I would assume, be much faster.  It needs a license.

 

http://www.beckhoff.com/english/twincat/twincat_io.htm?id=508651220

 

So far I have not found a way to directly communicate between LabView and EtherCAT, other than with 3rd party activex or dll drivers.

 

 

0 Kudos
Message 7 of 21
(13,279 Views)

This DLL looks interesting, is there any documentation of implementation into labview?

0 Kudos
Message 8 of 21
(12,927 Views)

I looked into this some more and successfully read data from an ethercat array through Beckhoff's TwinCAT.  I used the examples found at:

 

http://infosys.beckhoff.com/english.php?content=../content/1033/tcsample_labview/html/tcadsdll_api_l...

 

This link has documentation and labview vi examples for both the dll and activex connection to TwinCAT.  I found both of these connections to respond very slow.  However, it's not really the connection's fault, it's the way the data is called and retrieved.  The problem is that in all of these examples only 1 variable in TwinCAT can be addressed at a time.  While each single read/write is fairly quick, if your application has a few hundred I/O points it can become very slow.

 

The solution Beckhoff gave me was called the ADS SUM command.  This lets you read/write many I/O points all at once.  I have attached some example vi's.  They will be broken until you find "TcAdsDll.dll", which should be installed and come with the TwinCAT license.

 

At the end of the day I found connecting through TwinCAT to be somewhat of a pain.  So now I am investigating connecting a Beckhoff array to NI's real-time OS.

 

Hope this helps.

Message 9 of 21
(12,917 Views)

Glenn,

 

This is very interesting, can I be of some assistance?

 

I have used  the ActiveX coupling through twincat too in my early programming days. I have switched to their BK series fieldbuses that run on modbus. This

allows me to directly access the fieldbus without third party programs and licenses.

 

Reasons: End-user convenience:

 

1)no OPC server/twincat installation and configuration

2)the modbus from labview directly is robust and good, and runs on 32 bit and 64 bit (twincat 2.x wont run on 64 bit)

3)free, and relatively fast, at least faster than the activeX. <20ms for 100 words

 

 

Still, I am looking to work with ethercat in the future, due to its faster response time and higher data traffic.

 

I still don't understand why one would need NI realtime instruments before connecting to the fieldbus. If I have a realtime OS, or not even that, why cant I communicate through ethercat? Even if my demands are not certain response times (ie realtime).

 

 

 

 

 

0 Kudos
Message 10 of 21
(12,885 Views)