LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get control value doesn't work in exe

Hi All,
I have a VI (#1) that checks the value of a control on another VI(#2) before performing an operaiton.  I read the value of the boolean control with an invoke node (see attached pic).  This works when both are being run with the developement system.  When I build VI #1 into an application and run it with LVRT, while #2 is running on the developement system, I get a message that indicates that the value of the boolean control on VI #2 is false.  Since that is not true, I assume that it was unsuccessful in reading the control value.  Where have I erred?
Jim

LV 2020
0 Kudos
Message 1 of 9
(4,454 Views)
I assume you are losing this value because the front panel is stripped when building the exe.  Since I do not have experience with real-time targets, I am not sure if you can include the front panel in your build like you can if building a non-rt target. 

Paul
0 Kudos
Message 2 of 9
(4,437 Views)
Does the error cluster tell you anything interesting?
 
I don't use RT, but I am not sure if you can access controls between VIs running under different application instances (app and dev in this case). Wire the rror and see what it says.
0 Kudos
Message 3 of 9
(4,431 Views)

Hi Paul,

The front panel control that I am reading is on the VI running in the developement environment.  The VI reading the control value is running in the runtime environment. 

Altenbach, I don't get an actual error message.  I get a message from my compiled VI indicating that the control on the other VI is in the wrong position (off).

Jim

Message Edited by lmtis on 09-25-2007 01:17 PM

Jim

LV 2020
0 Kudos
Message 4 of 9
(4,425 Views)

I hesitated in responding here because I don't have all of the details in my head.

I read LVRT as "LV Run-time.

If so I think part of the issue is the process context.

One is open in the RT environment the other is running in the Develop context.

I THINK there is a way of use references hanging from the proj that will let you specify which context you want to touch.

The other idea is to make sure the other VI is designated as a dynamic VI and the proper instance is opened.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 9
(4,422 Views)

Hi Ben,

You are correct LV Run-time and devolopement, Completely different VIs, and the control read works when both are in developement context (LV7.1 BTW).  I don't understand how to make a stand alone VI that is open before the exe is started dynamic.  My next test will be to build an exe with the second and see if that clears this up.

Jim

LV 2020
0 Kudos
Message 6 of 9
(4,418 Views)
If you're going to want to get data from the LV development system into a LV EXE, you're going to have to use Open Application Reference, and pass that reference into Open VI Reference.  You will have to enable the TCP/IP VI Server in the Development System for this to work.


Message 7 of 9
(4,418 Views)

Hi Matthew!

I don't know where you came from or exactly when, but I am glad you did so!

Thank you,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(4,408 Views)

Thanks Matthew,

I'll give that a try as soon as I can get access to that station.

Jim

LV 2020
0 Kudos
Message 9 of 9
(4,398 Views)