12-05-2012 09:36 AM
I would like to use an array of doubles stored in a shared variable to store some scaling constants. I want to automate the calculation of the scaling constants and I need the values to be retained between closing and re-opening the vi/project. I believe the "Initial Value" field on the shared variable is the way to do this. I am aware that there are other, more brute-force methods such other than writing the values to a file and manually reading and initilaizing the variable on program launch, but it would be nice if I didn't have to jump through so many hoops.
When I calcualte the proper scale factor, how can I programmatically set the intial value field?
My goal is to change the current value of the particualar vairable and make sure it keeps this value if the vi (and the associated shared variable library) is completely unloaded from memory and then later re-opened, deployed and run.
Thanks!
12-06-2012 11:22 AM - edited 12-06-2012 11:27 AM
Is this using programmatic access (with a refnum) as opposed to a shared variable node? Where do you see the "Initial Value" field?
12-06-2012 11:28 AM
I guess it's only for DSC, I didn't realize that, but here's the doc: Initializing Shared Variable Values (DSC Module)
12-06-2012 11:28 AM
Yes to set any properties on a shared variable, I realize that I will have to use the refnum.
12-06-2012 11:17 PM
In that case, perhaps someone with DSC experience can help. I've never used it.