LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No 'Unit Label Text' Property Node for Numeric Elements in Array?

Solved!
Go to solution

The front panel of my VI allows the user to toggle between US imperial (ft) and European metric (m) units of length.


For numeric indicators on the panel the 'unit label text' property node allows me to switch units programatically to display 'm' or 'ft' as appropriate. I can't however do the same in arrays because, although numeric elements in arrays have unit labels, there doesn't appear to be a corresponding 'unit label text' property node.

 

Is there a workaround or am I missing something.

 

I usually Google my way out of such issues because you tend to find and learn more that way but on this occasion I've found nothing.

 

Using LabVIEW Community Edition 2022 on Windows 10.

Aim for the moon and the stars . . . and if you only hit the outhouse roof at least it's progress in the right direction.

0 Kudos
Message 1 of 8
(1,090 Views)
Solution
Accepted by topic author M31vyn

Kyle97330_0-1689871624649.png

Get the array element reference, cast it to a numeric, and then you can manipulate the unit text.

Message 2 of 8
(1,073 Views)

Why does something that is so simple and intuitive for a numeric indicator (R.Click>Create>Property Node>Unit Label>Text . . . et voilá) have to be so obscure and convoluted for the same thing in an array?


Thanks for your help. The solution works just fine, and is beyond what I am familiar with in LabVIEW so I would have struggled to get there on my own.

Aim for the moon and the stars . . . and if you only hit the outhouse roof at least it's progress in the right direction.

0 Kudos
Message 3 of 8
(1,049 Views)

@M31vyn wrote:

Why does something that is so simple and intuitive for a numeric indicator (R.Click>Create>Property Node>Unit Label>Text . . . et voilá) have to be so obscure and convoluted for the same thing in an array?


It doesn't. There are two ways you can create a property node which is implicitly linked to the array element:

 

The first is to do exactly the process you describe, but the trick is that you have to make sure you right click on the control which is inside the array and not on the array itself.

 

The second is to right click a property node and select Link to and then navigate the tree of the FP hierarchy until you find the array and select the control which is inside the array.

 

It should be pointed out that the all the array elements have the same properties (other than the value), so you only have a single control to link to.


___________________
Try to take over the world!
Message 4 of 8
(1,020 Views)

Awesome stuff. Every day's a school day.

 

It never occurred to me to click on the object on the front panel (duh!). I spent the day faffing about on the block diagram. 


Nor did I think to investigate the Link option. I guess subconsciously I assumed that if what I was looking for wasn't under Property Node then it wouldn't be available through Link either. (Once again, duh!)

 

I'm not usually this dim, but it was a long day. So again, thanks for the solution, and the lessons. I've learned three new LabVIEW things.

Aim for the moon and the stars . . . and if you only hit the outhouse roof at least it's progress in the right direction.

Message 5 of 8
(996 Views)
Aim for the moon and the stars . . . and if you only hit the outhouse roof at least it's progress in the right direction.

Hmmm..... how sturdy is the roof on an outhouse?

"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 8
(958 Views)

Very sturdy. Surely you've heard the expression, "built like a brick ****house". 😀

Aim for the moon and the stars . . . and if you only hit the outhouse roof at least it's progress in the right direction.

0 Kudos
Message 7 of 8
(920 Views)

@M31vyn wrote:

Very sturdy. Surely you've heard the expression, "built like a brick ****house". 😀


I've heard the term, applied to other things by the Commodores.

 

Nice landing.


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 8
(914 Views)