08-02-2011 02:09 PM
Hi, I am working on an application where in one part of the program the user can apply a waveform, then in a different subvi is this waveform is applied/not applied the default value of a certain control will be either digital trigger or no trigger.
In short I want to know how I can set the default of a control based on the t/f of a boolean control. I have attached a vi where I set the value, but in this vi, the value is permanent, I want to set the default but still allow the user to change the value if so desired. Any help would be greatly appreciated.
08-02-2011 03:05 PM - edited 08-02-2011 03:06 PM
08-02-2011 03:13 PM
The way I had it for true, the value would be set to digital, and then on the actual control its not allowing me to switch from digital to none. and vice versa for the false case. I think I will just make it such that the false case will set the value to none, and the true case will just operate as it is now. Thanks for your reply
08-02-2011 03:21 PM
Hi MLH,
"and then on the actual control its not allowing me to switch from digital to none."
Why not? It's a control so you're able to change it's setting - as long as you give the user some time for that operation. When you instantly process using the output of the case structure it's just bad programming - and your fault...
08-02-2011 03:22 PM
In short I want to know how I can set the default of a control based on the t/f of a boolean control. I have attached a vi where I set the value, but in this vi, the value is permanent, I want to set the default but still allow the user to change the value if so desired. Any help would be greatly appreciated.
DEFAULT values cannot be set at run time period- the default value is contained in the compiled code so changing a default value forces a re-compile obviously something that the Run Time Engine can't handle. It is possible to load values from a file and apply those values to the control. You can even make a decision at run time what value to load based on your boolean.
Look through the help for the configuration file operation palatte you'll get some ideas.
08-03-2011 11:49 AM
Hello MLH,
If you right click a control on the front panel and select Data Operations you are given the option to "Make Current Value Default." This sets the current value of the control to the default whenever that VI is launched. Hope this helps.
Cheers,
David A.