From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

VI Server in Project

Solved!
Go to solution

Hello,

 

I have a strange problem.  I am trying to read a control from a vi with another vi.  If I load these 2 vi's separately outside the project it works fine.  If I load them using the project I get an error that my vi is not in memory.

 

Any thoughts? 

Dan Shangraw, P.E.


   

0 Kudos
Message 1 of 8
(2,808 Views)

Your VI's were not located in the .zip file.  Only the project files were.

0 Kudos
Message 2 of 8
(2,790 Views)

Oops that would make it very hard to debug.

 

Here is the updated file.

Dan Shangraw, P.E.


   

0 Kudos
Message 3 of 8
(2,772 Views)

I do see what you mean.  (I loaded in LV 19, looks like your files are 18).

 

And I don't have an explanation.

 

One thing I found interesting is that opening up the VI's by themselves, which works, THEN opening up the project, it still works.

 

I'm  going to throw an idea out that it's like the VI opened within the context of the project must need some more within the name in order to be able to find it in memory.  I tried VI Server in Project/Main Test.vi  and VI Server in Project.lvproj\Main Test.vi and with backslashes instead of forward slashes, but none of that seemed to help.

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

When you run them outside the project, they are running in the Main Application Context.  When you have a project open, that project gets its own application context with its own memory space; and the VIs owned by the project run in that context,  Your "Read Control.vi" opens a connection to the Main Application Context, but "Test Main.vi" isn't there; it's in the context that belongs to the project.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 5 of 8
(2,709 Views)
Solution
Accepted by topic author ASTDan

I looked more into this and saw that if I right click on My Computer in the project there is an option that can be checked under VI Server and you can enable and select a port and service name.  I also had to enable VI server access and export the VI.  Attached is a screenshot of how I set them.  The access port had to be set to something different than the one that is set within LabVIEW's Tools >> Options dialog.

Message 6 of 8
(2,706 Views)

I am now getting an error 62.

 

I have tried different port numbers with no sucess

 

ASTDan_0-1579096347157.png

 

Any Ideas?

Dan Shangraw, P.E.


   

0 Kudos
Message 7 of 8
(2,696 Views)

I figured out the error.  Had to put a * in the machine access list.

 

Thanks so much!!!

Dan Shangraw, P.E.


   

0 Kudos
Message 8 of 8
(2,693 Views)