I'm developing a rather large application.
In this application I have a global variable containing all relevant data (histogram, std dev etc)
The reason I chose a global is so that I don't need to change all my controls in all my programs whenever I add a new data set to this global variable.
Now the only program I still need to do this is the program which makes plots of these data sets.
Now as my work grows, more and more data sets will be stored in this global variable.
And I don't want to keep having to change stuff in this vi, which has two controls stating what should be plotted versus what.
x-axis vs y-axis so to speak. These controls are enums, so the user can easily select which data to plot versus which other data.
Is there a way for this program to automatically adept to the content of my global.
Example:
Say my global contains 4 data sets in the relevant "output data" cluster (all always of the same size):
cluster (data1 (1:100), data2 (1:100), data3 (1:100), data4 (1:100)).
And my enums:
enum1 (data1=1, data2=2, data3=3, data4=4)
enum2 (data1=1, data2=2, data3=3, data4=4)
This way I can convert the cluster to an array and use "index array" to get the relevant data set.
Now the user can select from the two enums to plot data1 vs data2 for instance.
Now I add two more sets, data5 (1:100) and data6 (1:100) to the global variable.
cluster (data1 (1:100), data2 (1:100), data3 (1:100), data4 (1:100), data5 (1:100), data6 (1:100)).
Is there a way for these two enums to check how many sets of data are present in the global, and what their names are?
So that they now automatically become:
enum1 (data1=1, data2=2, data3=3, data4=4, data5=5, data6=6)
enum2 (data1=1, data2=2, data3=3, data4=4, data5=5, data6=6)
If anybody knows how to do this than that would be great.
Thanks in advance.
Best regards,
Arend Hiddema