LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Unit Test Framework: workaround for forbidden control label characters?

Solved!
Go to solution

Hi,

 

I'm using LabVIEW's Unit Test Framework and it's telling me that I'm not allowed to use unit specs such as [Celsius] in my control labels:

 

"The control label cannot contain the following: \n, \r, tabs, array brackets, name separators, and decimal separators.

Controls in the VI under test contain [] or /."

 

Renaming these labels is an awkward option for me as the bracketed unit format is on our company conventions.

 

Can anybody think of a workaround so that the test framework ignores these labels?

 

Thanks,

 

Peter

 

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

Hi Peter,

 

may be you can use programmatic renaming of your control labels a workaround. You could still keep the caption to hold array brackets around the unit.

 

The programmatic renaming is pretty simple. I wrote a little VI that does the renaming for another VI, see the attachment.

 

-Topper

 

 

0 Kudos
Message 2 of 4
(2,179 Views)
Solution
Accepted by topic author bokorpet

There has been some discussion on those "Naming Conventions"  As a general concensus was arrived at it became apparent that the better methods for controls and indicators is to use short "Lables" and put amplifying info in the Caption showing the caption on the FP and not the Lable.

 

e.g. 

"Temp"

"Temperature [Celsius]"

 

This saves lots of BD space when buldling / unbundling or using VI Server refs, Still give the user all the info they need and, the help will show the caption if one exists.  It even makes it possible to change the Default Value (0) without messing up any type defs.

 

In your case the UT Framwork would also be happier if you adopted this approach.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 4
(2,175 Views)

Thanks guys!

 

Using captions instead of labels seem to be an acceptable workaround and one can use Topper's program to copy labels into caption names.

 

Peter

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