LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DSC VI won't connect to shared variable outside of project

My main VI will start up and connect to shared variable if I first have my project open.  It will not connect to them if I try to run it by itself.  I am deploying the library programmatically, but that doesn't seem to help.
 
Also, I can't get the main VI to run on startup.
 
Thanks
0 Kudos
Message 1 of 13
(22,120 Views)
Try running your app in the development environment without Autodeploy selected and then see if it still works (since you are deploying it programmatically).  Are your shared variables netowrk published or are the single process??

By your vi wont run on start up, so that mean if you open the vi, it should start running??  If so, go to VI Properties > Execution and check run when opened.
Kenny

0 Kudos
Message 2 of 13
(22,100 Views)

Variable are network published.

I do have it selected to run when opened.

0 Kudos
Message 3 of 13
(22,094 Views)
 

This link may provide some information.

I am assuming that you do not have any erorrs or warnings that pop up when you run the vi by itself?? Have your tried highlighting execution to make sure that you have deployed the variables correctly??

Are you running the vi itself without the project open or are you trying to run an executable??

Kenny

0 Kudos
Message 4 of 13
(22,093 Views)

Kenny-

I get no errors.  I am trying to run the VI by itself without the project open.  I will eventually need to run an executable.  I will try highlighting.

Thanks

0 Kudos
Message 5 of 13
(22,011 Views)
Hi Brian,

What exactly mean that the shared variables will "not connect" ? Are you using bind to source? Have you checked to see whether the library is deploying successfully? To do this, please use the variable manager, available under Start->Programs->National Instruments->Variable Manager->Variable Manager. Everything listed under Local System are the deployed libraries and their variables, which you can monitor on the right hand section of the screen.

Also, what do you mean that your VI will not launch at startup - startup of Windows? LabVIEW?

Best regards,
-Sam F, DAQ Marketing Manager
0 Kudos
Message 6 of 13
(21,993 Views)

Sam-

I mean that the quality indicator stays red and no values are updated.  I am binding to a source, and it works fine when opened from the project.  I will check to see if the library is deploying.

I should have said that the VI will not "Run When Opened".

Thanks,

Brian

0 Kudos
Message 7 of 13
(21,969 Views)

I have some more information.  The VI will run when opened when I open it outside of the project, but not from within the project.  When I run the VI "stand alone", the variable engine is running, and I can view the values in the variable manager.  The data binding properties of the variable in the standalone VI are lost for some reason.  The path to the library is blank.

Another thing I don't quite understand.  If I have a library called "My Library.lvib" in folder "c:\My Libraries", the data binding path for the variable in the working VI gets changed to "My Computer\My Library.lvib"  Why is that?

0 Kudos
Message 8 of 13
(21,584 Views)
Hi Brian,

Thank you for the additional information. Let's put aside the run when opened issue and try to work on having your variables deploy and connect successfully.

When you run the VI within the project, are the variables successfully deployed as well?

Where are you seeing that the path to the library is blank? Where do you see that the data binding path for the variable in the working VI gets changed?

It would be quite useful for you to post a small example project, with one library, and we can tackle these questions individually, as with so many configurations (in project, not in project,  running when opened, deploying successfully), I am having a little trouble keeping them straight.

Trying my best to help,
-Sam F, DAQ Marketing Manager
0 Kudos
Message 9 of 13
(21,320 Views)

Sam-

I will try to create an example project, but here is a synopsis:

I have a project that contains a library and a main vi, plus sub-vi's.  When I open up the main VI from within the project and run it, the shared variables in that library get deployed and displayed on the front panel of the main VI, and all is well.  I do not have them set to autodeploy.

When I open the main VI by itself, and run it, the "deployment status" window doesn't appear, and the shared variables on the front panel do not get updated.  No errors occur during deployment, but it happen within a second, instead of taking several seconds, so I don't think anything is happening.  If I right click on a front panel control that is bound to a shared variable and look at the data binding properties, there is nothing in the box that should have the library path and variable name in it.  It is as if it has lost its association with the shared variable.

Thanks,

Brian

0 Kudos
Message 10 of 13
(21,228 Views)