LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

setting fron panel

I've created a front panel of a spectrum analyzer. I want save same configurations;each one for tipical measure. how can i do it?
0 Kudos
Message 1 of 4
(2,821 Views)
1. Create write local variables (or property nodes, selecting the value property) for each control you want to initialize.
2. Create an array of clusters with the cluster having a control for each control you want to initialize.
3. Initialize the array of clusters so each array element represents one configuration.
4. Add a text ring or menu ring to your front panel, adding and naming an item for each configuration.
5. Add an Index Array function to your diagram. Wire your array of clusters to the array input of the Index Array function and the text ring to the Index input.
6. Wire the output element of Index Array to an Unbundle by Name function, expanded to have an output for each control you want to initialize.
7. Wire the outputs of Unbundle by Name to each of the write local variables for the controls you want to initialize. The execution of this step could happen just once at the start of your program, or you could check the text ring value in a loop where you're taking your measurements to see if it changed, or (in LV6.1) you could use an Event Structure to trigger a reconfig.
To initialize the array in step 3, you could use at least three different methods.
3.A Have an array constant on your diagram (least flexible option).
3.B Have an array on your front panel with the configurations entered and saved as the default. Make sure you're saving the array default, not just a default cluster or individual control. You could move this array off of the displayed area of your front panel so it's not normally visible when you're taking measurements. You can still scroll the front panel to get to it.
3.C Read control values from a text file and fill in the array. The text file could contain one line per configuration with the configuration name and its parameters. With this method, you could even give the operator the option to name and save a new configuration. To display the configuration names, you can use a property node for the text ring and update the Strings[] property with names read from your file.
0 Kudos
Message 2 of 4
(2,821 Views)
great idea! I've just had it, i hoped for another solution. thanks a lot
0 Kudos
Message 3 of 4
(2,821 Views)
See if this link will help.

http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000002D6F0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 4 of 4
(2,821 Views)