LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling VI for Beckhoff TwinCAT

Hello,

 

I am researching possible ways of compiling LabVIEW VI for usage in TwinCAT. I would like to write signal processing VI and use it in my PLC project. Does anyone have any experience?

 

Kind regards

Ferchele

0 Kudos
Message 1 of 5
(3,519 Views)

Hi Ferchele,

 

I don't think a VI (or LabVIEW-created executable) will run on your PLC.

(What does Beckhoff say about executing arbitrary executables on that PLC?)

 

Why don't you implement this "signal processing" with the TwinCAT tools?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,486 Views)

Hi Ferchele,

 

I am currently working on a project that involves deploying LabVIEW applications to a Beckhoff controller.  This project is in early development, so my experience with it is limited, but I have been able to successfully run a LabVIEW executable on the Beckhoff Windows layer that streams data from the PLC layer.  I am using .NET calls to the TwinCAT Automation Device Specification (ADS) architecture.  The ADS library is built into the base PLC library, so you will be able to develop your signal processing functionality in LabVIEW, without having to pay for anything extra off of Beckhoff's a-la-carte library menu.

 

I am using a CX5140 controller, which has 4 GB DDR3-RAM; Intel Atom E3845 processor (1.91GHz Quad-core) and is running Windows 10 IoT Enterprise 64-bit.  I have reserved core 0 for the Windows layer and cores 1-3 for the PLC layer and have not had any issues with resource usage, but your results may vary, depending on your controller.

 

My LabVIEW version is 2019 (19.0.0) and the only "Additional Installer" I included in my Installer build specification was LabVIEW Runtime.

Message 3 of 5
(3,438 Views)

Hi MStewart,

thank you very much for your response and also for proof that the idea is possible. I have finally some time again to work on my project. Currently I am learning (Beckhoff) PLC programming and Visual Basic workflow. I have researched .NET LV palette and also possible ways of compiling LV VI. Based on your response and LV help, it seems that "Build Specification -> New -> .NET Interop Assembly" is what I am looking for. Can you please confirm my assumption? 

Kind regards Ferchele

0 Kudos
Message 4 of 5
(3,354 Views)

Unless you are trying to do something that I don't understand, just build the LabVIEW side into a normal application. The two layers (LabVIEW application and TwinCAT) will communicate through the ADS server. (Which I believe is just built on top of TCP messaging)

 

If you want your LabVIEW application to run on the Beckhoff PC, just use local host as the AMS net ID. If you want your LabVIEW application to run on a separate machine, you will need to give it the IP of the remote machine. 

 

The code is terrible and should only be used as a reference for which functions to call, but Beckhoff provides examples in LabVIEW using the .NET api.

 

https://infosys.beckhoff.com/english.php?content=../content/1033/tcsample_labview/html/tcsample_labv...

0 Kudos
Message 5 of 5
(3,338 Views)