LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
jkurtw

Add Programmatic Access for Single Process Shared Variables

Status: New

In LabVIEW 2009, the programmatic API for shared variables and I/O variables was introduced. This allows you to reference a variable by name, rather than dropping a static node on the diagram.

 

Some of the benefits are: iterating over many variables with looping structures, creating modular code, and dynamically accessing variables based on names in a config file for example. 

 

Programmatic access to single-process shared variables would also be useful.

 

(Single-process variables are effectively global variables (not network published), but use the same static node as the shared variable and are contained in project libraries.) 

 

4 Comments
Hokie
Member
This would be very useful for applications where I want to have an independent "driver subVI" that makes asynchronous data sets available in LV that are updated from "outside" sources such as networking or serial comm, especially if I want to build a reusable infrastructure that can scale as more data points are passed.  Today I end up either statically wiring to SPSVs (which doesn't scale very well), or using complex (and sometimes non-RT safe and CPU intensive) mechanisms such as functional globals containing variants, arrays, and/or strings.  If you add the ability to programmatically create and destroy the variables this would be really powerful. 
muks
Proven Zealot
I agree with hokie. Kudos..
JKSH
Active Participant

I was excited to discover http://zone.ni.com/reference/en-XX/help/371361G-01/lvconcepts/switchtoprogsvaccess/ 'cos I thought I could now cleanly loop through all my variables!

 

...but then I found out that "shared variable" does not include "single-process shared variable" 😞

Certified LabVIEW Developer
Woss
Member

5 years later, the status of this very needed feature is still "new" when imho, it should already be available by now. The same way we should be able to data bind controls to single process variable. We dont want to publish every variable on the network. Single process shared variable are seriously lacking a lot of interesting features available only to the network published ones.