04-29-2009 09:56 AM
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.
04-29-2009 10:08 AM
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
04-29-2009 10:31 AM
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.