Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision Builder AI and EtherCAT (read/write DI/DO)

Hi,

 

is it possible to receive and send data in VBAI over an EtherCAT connection? For testing purpose I wrote in LabVIEW a simple VI, which could read the inputs of an EtherCAT slave and write to the outputs of an EtherCAT slave. I had to configure this slave in the LabVIEW project so that the I could use the inputs/outputs of the slave. I know how to run a VI in VBAI but I can not run the VI that reads the slave's inputs or writes to the slave's outputs. I think that is because VBAI doesnt know the configuration of the EtherCAT Master (CVS-1458RT)? Is it actually possible to access the EtherCAT interface from VBAI?

 

Thank you in advance.

0 Kudos
Message 1 of 6
(4,057 Views)

Hi Andreas_Elster,

 

did you install the EtherCAT Driver on your CVS-1458RT?

 

 

Kind Regards,

SG3 | Staff Applications Engineering | National Instruments | NIG |

0 Kudos
Message 2 of 6
(4,030 Views)

Hi SG3,

 

as I mentioned the EtherCAT connection worked previously in a LabVIEW project. The EtherCAT driver is installed and works properly. The atteched VI just switches a digital output of a EtherCAT slave (Beckhoff EL2809) on and off. But I don't understand how VBAI can run this VI without the configuration of the EtherCAT master. Or is the configuration also stored in the .llb file?

 

Thank you in advance

0 Kudos
Message 3 of 6
(4,015 Views)

Dear Andreas_Elster,

 

this really can't work because this Variable is bound to the LV-Project.

 

To call this variable in the VBAI you need to access to it by the I/O-Varaibles API in Labview.

 

How to work with this is described in this KnowledgeBase here: How Can I Programmatically Discover and Access EtherCAT I/O Items?

 

 

Kind Regards,

SG3 | Staff Applications Engineering | National Instruments | NIG |

0 Kudos
Message 4 of 6
(4,006 Views)

Vision Builder AI can access the variables declared on other systems. Go to Tools>>Variable Manager, then click on the Network Variables tab.

Click Add, then click on the Select Source Item button.

You should see in the list Ethercat IO Variables you created on the PC. You can then create a VBAI variable that point to this.

If you don't see it in the list, first create a variable on the PC that is bound to the Ethercat IO variable.

Do that using the Distributed System Manager. Then create the variable on the VBAI side that points to the variable on the PC.

Note that this solution requires the PC to always be online to act as the server between the CVS and the Ethercat Slave.

 

Hope this helps.

 

Christophe

0 Kudos
Message 5 of 6
(3,944 Views)

Thank you for your replys to my question.

 

@SG3: I will try your solution as far as possible or maybe I'll use my CVS in Labview mode and call the VBAI inspections from Labview. This way I have no problems to access the I/O Variables from Labview.

 

@Christophe: The whole inspection runs only on a Compact Vision System and no ohter computer is involved. So I can't let VBAI run on another system than the EtherCAT master (CVS). If SG3's solution doesn't work satisfactory for my I'll try the other way with Labview.

 

 

0 Kudos
Message 6 of 6
(3,932 Views)