Industrial Communications

cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime device allocation with EtherCat in LabVIEW

We are looking at the possibility of using EtherCat to communicate with a chain of MFCs and sensors in a system. However, our system comes in many variants with some having more devices than others. Is there any way with the LabVIEW implementation of EtherCat to dynamically build up the chain of devices? Looking at the documentation it seems like all devices have to be defined in the project which I don't believe will work for us as we don't want to built a separate executable for every variation. Thanks.

0 Kudos
Message 1 of 8
(5,236 Views)

Hello,

 

When you mention "build up the chain of devices", do you mean to auto-discover and auto-configure all EtherCAT slaves? If so, NI EtherCAT provides programmatical methods. You can see the details in this KB.  You can find some example code here.

 

Thanks!

0 Kudos
Message 2 of 8
(5,190 Views)

Will this API work with non-NI EtherCAT slaves?

 

Thanks.

 

 

0 Kudos
Message 3 of 8
(5,162 Views)

Yep, non-NI EtherCAT slaves support is mentioned in the KB:

 

Capture.PNG

0 Kudos
Message 4 of 8
(5,153 Views)

I did this successfully with a number of Beckhoff EP series slaves. One odd  thing though is that the Device Name that the scan engine gives each device does not follow the EtherCat address. What I mean by that is that instead of EtherCat devices names for addresses 0,1,2,3.... are not necessarily "Device1", "Device2", "Device3", "Device4". Some are out of order with respect to address. 

To be able to dynamically access item thru scan engine, it would be very helpful if you KNEW that Device7 always corresponded to address 6, for example. 

What is going on there? 

0 Kudos
Message 5 of 8
(4,111 Views)

Hi MarkCG,

 

Do you mean that you saw the name of Device1 if the slave address is 0? 

 

Thanks!

0 Kudos
Message 6 of 8
(4,048 Views)

No, Device number out of order with address number on some slaves.

0 Kudos
Message 7 of 8
(4,024 Views)

Hi MarkCG,

 

We did not see this phenomenon before. Is there any error? Could you take a snapshot of which slave is the wrong number?

 

Thanks!

0 Kudos
Message 8 of 8
(3,999 Views)