LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 01/02/2007

Happy New Year, everybody!  Today's nugget comes from altenbach, who points out some pretty cool things you can do with the "Advanced editing mode" option on the Format and Precision property page for Numeric controls:
 
 
As you can see, the value in a numeric control can be "redisplayed" in different formats *within the same control*.  Also, descriptive text can be added within the control itself, eliminating the need for extra free labels on the front panel.  In the VI screenshot below, several numeric controls have been formatted in different ways to illustrate the flexibility of format strings for Numeric controls.  The format string used for each control is given as a free label next to the control.  Notice the "Distance" and "Time" controls at the bottom, where the format string is used to give a more easily readable display of the actual value.
 
 
-D

P.S. - Check out past nuggets here.

Message Edited by Darren on 01-02-2007 11:21 AM

Download All
Message 1 of 18
(13,651 Views)

Darren,

When I try to duplicate your numeric control when I add the second value it comes up invalid. could you post the sequence to create this and the VI that you created.

thanks

figured it out I had the representation set to DBL by default

Message Edited by Jhoskins on 01-02-2007 04:52 PM




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 2 of 18
(13,600 Views)

Hi Joe,

Change your numeric to an integer datatype and it should work...the format codes given in the screenshot are not valid for floating point values.  Also, those are zeroes in the format string, not capital Os.

-D

 

 

0 Kudos
Message 3 of 18
(13,585 Views)
Sweet!!!

Wonder why I haven't explored this feature before... Thanks Christian - and Darren!
Cheers,
Philip Courtois « Development Engineer « 2C A/S « Denmark « Heading towards CLA

Message 4 of 18
(13,515 Views)
I don't see how you can have multiple lines. I enter "Decimal: %d" and press the <enter> key and the cursor stays put.
0 Kudos
Message 5 of 18
(13,114 Views)

Try Shift-Enter.

-D

0 Kudos
Message 6 of 18
(13,108 Views)
oh... thanks Darren.
0 Kudos
Message 7 of 18
(13,103 Views)


@Philip Courtois (temporary profile) wrote:
Sweet!!!

Wonder why I haven't explored this feature before... Thanks Christian - and Darren!

You're welcome, "Master of Champions Emeritus".

Remember these things also work well for controls.

For example, try the increment/decrement button on the first three-line control.

Also note that you can change any of the three values in the first control and the others will immediately adapt accordingly. For example, you can edit the HEX part or change one bit in the binary part and all three lines will immediately reflect the new value. (Without this feature, we would probably need to invent a complicated XControl to do the same :D) 

Message 8 of 18
(13,027 Views)
Ditto all of what Christian wrote!
 
"
 (Without this feature, we would probably need to invent a complicated XControl to do the same
"
 
Hmmmm.....
 
Do you think that NI may have already implemented controls as XControls (quietly behind the scenes)? Smiley Surprised
 
Look at how the graphs have morphed into composites of picture controls and tables.
 
In fact the table itself appears to be an XControl implementation using a picture control. See this thread.
 
 
So this is all rather exciting!
 
Not only does it show what can be done with XControls ( Wow!)
....
but it also means that LV is being developed in LV,
 
And... just maybe....
 
The existing libraries of all of LV controls MAY be opened to the user?
 
Let me join the others in thanking both Christian adn Darren for "digging up this golden nugget".
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 18
(13,020 Views)
Has anyone found a Property Node for this?
 
Michael
0 Kudos
Message 10 of 18
(11,455 Views)