LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating and loading 4000 shared variables

I need some help laying out the design of this system.  The data is coming over reflective memory.  I've written a dll and a simple server to do the interface between the reflective memory and shared variable engine.  Everything seems to be working.  The problem I am having is with scaling the application up to handle approximately 4000 variables.  I have a spreadsheet to manage the reflective memory allocation and can use it to import the shared variable definitions with the names from the system that is writing the data.

 

I am having trouble deciding on the best way to proceed.  I would like to read a buffer from reflective memory instead of reading 4000 times.  I also would like the server to read in a file that defines the association between the shared variable and reflective memory address.  The problem I am having is getting the data out of an array into each of the shared variables.  I don't see a way to load the value of a shared variable using the property node (so that I can do this inside a loop).  I also can't setup an alias that would access an array element.  I don't want to manually create 4000 variables.

 

Any ideas would be appreciated.  Thanks.

0 Kudos
Message 1 of 3
(2,609 Views)

I have never had to resort to creating Shared variables programatically so I will leave that for others.

 

I would cheat.

 

In LV 7.1 DSC i could import my tag config from a csv file. After importing and saving in LV 7.1 I could let LV create the SV's when the code is updated.

 

THat all assumes I will only have to do that one.

 

I have used the interupts fired when SCRAMNet locations update to "steer" the value to appropriate code which could then in turn update the SV using a datasocket write since I can compose the URL for the SV dynamically.

 

Just sharing ideas,

 

Ben

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

How about setting up a Cluster that identifies the (String) Name, and (Numeric) Value, and then identify and Array of these Clusters ?

This Array then becomes the Shared Variable, and the 4000 pts of data are directed to the array, by index.

 

0 Kudos
Message 3 of 3
(2,591 Views)