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: 

Host computer VI deploying to cRIO controller

Solved!
Go to solution

When I include a Network-Published Shared Variable in my Host VI, the VI wants to deploy to my cRIO.  Without the Network-Published Shared Variable it runs on the Host computer as intended.

Yes, the Host VI in under My Computer and the RT VI is under the target in the LabVIEW Project.

 

How do I use a shared variable in a VI inteded to run on the Host computer?  I need to pass data between my RT VI running on the cRIO and a Host VI running on a Host Windows machine.

 

Message 1 of 8
(4,807 Views)

Hi,

 

When you include a Network shared variable in to a VI running on a host computer (it doesn’t even matter if you have a RT target configured on the project or not, you can try it if you want) and try to run it, a window with that progress bar will appear. What this window shows is the progress on publishing the variable (not necessarily deploying to the RT target).  The window is similar to the deployment window and that might be causing confusion, or maybe I am misinterpreting your post. Do you think that might be was is happening?

0 Kudos
Message 2 of 8
(4,773 Views)

Hello Shall12,

 

You may need to select the "Disable Autodeploy Shared Variables" option for your host application space; without this the variables will be redeployed when your host application launches.

 

Untitled.png

 

Regards,

Tom L.
0 Kudos
Message 3 of 8
(4,767 Views)

The Conflict Resolution dialog box reports "The target is already running a Real-Time Startup Application.  Press OK to confirm you want to abort the existing application and connect to the target from this project."  I do not want to abort.  I would like the VI to run on the host computer.

0 Kudos
Message 4 of 8
(4,757 Views)

When I right click I get a different list.

 

Untitled.jpg

0 Kudos
Message 5 of 8
(4,756 Views)
Solution
Accepted by topic author shall12

Hello Shall12,

 

I misinterpreted your initial posts- this option needs to be modified for the target on which the variables are deployed.  Based on your screen capture, the library is contained on the RIO and will need to be modified there.  The behavior you're seeing is described in more detail here:

 

KnowledgeBase 4TIGNL8A: Disabling Auto-Deployment of Scan Engine I/O Variables

http://digital.ni.com/public.nsf/allkb/D9CF23FD2534E128862575430080CA17?OpenDocument 

 

KnowledgeBase 3V0H36XL: Connecting a PC Host VI to a Startup Application on a Real-Time Target

http://digital.ni.com/public.nsf/allkb/A82CEF3FDC14DCA68625712500009649

 

 

Tom L.
Message 6 of 8
(4,749 Views)

I found that if I close the LabVIEW project and only open my Host VI, the VI runs on the Host Computer.  But, the shared variable is empty and gives me: error code -1950679034  

LabVIEW:  (Hex 0x8BBB0006) The shared variable has no value.

Shared Variable in Host Main.vi<APPEND>
This error or warning occurred while reading the following Shared Variable:
\\NI-cRIO9025-0156F0B2\SharedVariables\Time
\\10.15.5.53\SharedVariables\Time

 

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

YES!!!!   Disabling the Autodeploy Variables on my target fixed the problem.  The Host VI runs on the Host Computer and the RT VI runs on the cRIO and variables are passed correctly between the 2.  Thanks.

Message 8 of 8
(4,719 Views)