LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying an RT app with Network Variables

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 1 of 5
(3,498 Views)
   Oops - the message got posted before I even wrote it - sorry!
   I'm working on a simple RT daq app that acquires 32 channels of AI and pops them into a network variable for a host program to read several times a second.  I build and deploy the app as a startup so that it starts every time the PXI RT system boots.  I want to move the RT box to another computer that has LV, but not LV-RT.
   I first tried using the variable server on the host.  The LV box boots and the app starts.  I start my program on the host, and it connects.  Everything is fine.
   However, to make the transition to another computer easier, I would like to host the network variables on the RT box.  Then I don't have to deploy them to the network variable engine on the new computer.  When I write the program this way, the RT half still boots and runs.  Using the variable monitor program, I can see that the variables are hosted on the RT box and are being updated.  So I open the host program in LV and start it.  It has to deploy some sort of connection to the network variables, so a deploy dialog pops up.  It finds out that the RT box already has an app running and says that if I continue to deploy, that app will be stopped.  If I cancel, the host app doesn't run.  If I don't cancel, the RT app stops.  I have to connect to the RT box again and redeploy the RT app.  Then both are running and I get data.
   Is there a way to host the variables on the RT box, and have the RT program start automatically on bootup, and have LV for Windows start a program that gets the variables off the RT box from a Windows machine that doesn't have RT?

Thanks,
   Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 2 of 5
(3,492 Views)
By default, LabVIEW automatically deploys any variables used by a VI when you run the VI.  For a Variable deployed to an RT target, that involves connecting to the RT target, which is why you are seeing the message about the startup application already running.

To disable automatic variable deployment by right-clicking on the library in the project. The menu will have an "Autodeploy Variables" item, which will have a check mark next to it, indicating that automatic deployment is enabled.  Select the "Autodeploy Variables" item to disable automatic deployment.  If you right-click on the library again, you should see that the item no longer has a check mark next to it.  If you have several libraries with variables deployed to your RT target, you will need to repeat this for each library.  That will allow you to run your host application without getting the conflict from RT.

If you make change any of the variable properties in those libraries you will need to explicitly deploy the libraries for the changes to take effect on the target, since you have disabled the automatic deployment.  Do that by right-clicking the library and choosing "Deploy" from the menu.

-Chris
0 Kudos
Message 3 of 5
(3,480 Views)
ChrisRP,
   Thanks for the explanation.  I'll give it a try later tonight.
   I think I understand the general idea now.  It is a bit confusing or counter-intuitive that deploying a variable to an RT Target should force the running app to stop, just like deploying another app.  Is there any chance that this will be changed in the future?

Regards,
   Dave
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
0 Kudos
Message 4 of 5
(3,477 Views)
The startup application is stopped when you deploy variables to ensure that you do not deploy changes to variables that are part of the application.  Changing the datatype of one of the variables being used by the application, for example, would cause the application to stop working properly.  We are looking into improving this behavior in the future.

-Chris
0 Kudos
Message 5 of 5
(3,447 Views)