LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

front panel controls in subVIs

Hi

 

What's the problem in using non-default values on front panel controls in subVIs? What's the better practice?

0 Kudos
Message 1 of 4
(2,711 Views)

Hi HMz,

 

there's no problem…

 

Btw. what are "non-default" values?

What do you understand by "better practice"? Compared to what?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,709 Views)

Hello H. Mz,

 

If I understand your question correctly, you're referring to the general recommendation to "Set a useful default value" for subpanel controls rather than leaving them as the default for the data type. The wording here is perhaps confusing, but in this case the "default value" refers to the value stored as part of the VI's source and is the value that the control populates with when it is loaded.

 

In general, you want to set the default values for your controls so that they:

 

- Cause appropriate "default" behavior to happen if the terminal is flagged as not required. This is probably the most important reason.

- Resemble actual inputs (if your sub VI will only only work with a value between 1 and 100, don't set the default to 999).

- Allow the VI to run as a standalone function with a meaningful result.

 

If you can elaborate on what you mean by "default values" we might be able to offer better advice.  Also, there is rarely a single best practice that covers every possible situation.  What are you attempting to do?  What is the scenario you have in mind that caused you to ask this question?

 

Best Regards,

 

Tom L.
0 Kudos
Message 3 of 4
(2,695 Views)

Hi

 

'non-default' -- That's what I'm also trying to figure out. Smiley Very Happy I was going through my CLD result feedback, and in the style section it says "non-default values on front panel controls in subVIs". I usually don't set any default values for controls in subVIs and leave them empty (I wire a constant in the main VI to avoid problems, where the value of control is not specified). As I understand using non-empty values in the subVIs are an additional memory burden. Smiley Frustrated

0 Kudos
Message 4 of 4
(2,648 Views)