From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

CVT works when VI Runs, but fails to read when run in Executable file.

Hello, any help on this issue is appreciated, I'll try and outline as much context as possible:

 

We have a LABView 2015 application. We run a VI called "Tag Engine" which reads tags from the PLC and stores them into the CVT. Then in other executable files we are trying to read that CVT to create our front panels for operators. We put SubVIs into .llbs (probably switching to a protected vi lib). When we run any of these front panels by clicking the VI, it works fine. However, when we open the project of that VI and run from there, the CVT seems to break (stops reading). If we package that VI into an executable it also stops reading. Note that it all runs fine, it's just the data communication portion of it that fails.

 

What happens to global variables, or however the CVT works, when switching between a VI and an .exe that we can troubleshoot?

 

I tried changing the CVT subVI to a static reference. I am currently trying to change the .llb to a packed library (general improvement anyways I think so we can lock it). I tried including the .llb in the "Always Included" source files of the .exe. I removed any "This VIs Path" constants that seem to conflict with .exe files and replaced them with application directory, that definitely helped get the .exe running. 

 

I would attach the program if I could, but it's very dense and we are DoD.

 

Thank you for any help in advance!

 

0 Kudos
Message 1 of 2
(2,090 Views)

It is all about Application Context.  When you run an executable, everything is contained in that application.  Other applications, including LabVIEW.exe and any VIs the editor is running, cannot access that data.  You have a similar issue when trying to run a VI in one project context and try to read data from a VI in another project context.

 

So solutions could include using TCP communications to talk between your applications or Network Published Shared Variables (*shudder*).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(2,052 Views)