LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating, writing and reading shared variables, all progrmmatically

Hi,

 

I can programmatically create library and then create and add shared variables to it, (and save the library). But yet have not managed to correctly have write and read access to the shared variables!

 

I have few subVIs which are launched by the main VI all in the same project. The main VI creates all mentioned above, subVIs are supposed to write into the SVs, and again the main VI is supposed to read them, this looks like a very standard architecture, Do I have problem in addressing the SVs? I have tried many different combinations; Network Published (+ deploy), Single-Process, path, URL (psp, I even tried DataSocket access-dstp), ... I receive no error message, just do not see the values on the main VI table!

 

Have been throug hmany similar threads, most of them are actually working on statically created SVs, the only one which created SV in run time have no suggestion on the access, (or when can access if it is important), and anyway, I tried to combine the ideas,...

 

Any helping comment would be appreciated.

 

Sia

0 Kudos
Message 1 of 4
(2,831 Views)

Have you deployed the library after createing the SVs?

 

I would try using the DataSockets after they have been deployed.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 4
(2,830 Views)

Hi and thanks for reply,

 

yes, I have deployed programmatically. However, is this necessary anyway? or only if SV is defined as Network-Published? I have tried DS approach, too, both simple open+close, and via DS server, with different URLs...

 

I'm a little suspicious to the timing for deployment and access; after creation and deployment are done in run-time, can another programmatically launched subVI make write access to the SV? how about the order of saving things? I am saving library after deploy, and then closing both library and the container project, and thath's it, the subVI starts at this point to access the SV...

 

Sia

Message Edited by Siamak on 08-19-2009 09:01 AM
0 Kudos
Message 3 of 4
(2,818 Views)

Got everything right now,

Thanks anyway.

Sia

0 Kudos
Message 4 of 4
(2,800 Views)