07-22-2010 05:26 AM
: 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
07-22-2010 06:28 AM
07-22-2010 06:59 AM
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 🙂
07-22-2010 08:21 AM
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
07-23-2010 07:53 AM
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! ! !
07-29-2010 03:41 AM
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:
You can build the EtherCAT network with the supported controllers. The following is a typical EtherCAT network:
Regards,
Casper
07-29-2010 02:42 PM
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.
11-29-2010 11:49 AM
This DLL looks interesting, is there any documentation of implementation into labview?
11-29-2010 12:29 PM
I looked into this some more and successfully read data from an ethercat array through Beckhoff's TwinCAT. I used the examples found at:
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.
11-30-2010 07:02 AM - edited 11-30-2010 07:04 AM
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).