LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiled Data Switched instantly from front panel?

Solved!
Go to solution

This is really only for looks, but I was wondering if there was a way to collect data and convert into two different types instantly on the front panel. Let's use binary and hexadecimal because that's what I am collecting. I have a huge array of numbers that gets converted into a huge array of binary or hexadecimal, depending on what the user chooses from the front panel. If that person chose binary, but then wants to look at it in hex, could this be done without re-running the VI?

 

 

Thanks

0 Kudos
Message 1 of 11
(3,340 Views)
Solution
Accepted by topic author Szklanam

Just right-click the indicator Visable Items>> Check Radix

The operator can select Decimal, Octal, Hexadecimal or Binary

Untitled.png


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

Jeff's solution is really simple and you should be showing the Radix anyways for clearity if you are showing a numeric in anything but decimal.  Nothing like thinking you have a bug when you really don't because you thought you read decimal and it was really hex.

 

The other option I've seen is to have a control to allow the user to choose the radix for all of the controls and you can then set the display using property nodes.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 11
(3,330 Views)

I am only able to choose decimal or SI notation

0 Kudos
Message 4 of 11
(3,329 Views)

That's because your data type is a floating point.  You have to have an integer type (U8, I8, U16, etc.) to be able to display hex, binary, or octal (who the heck uses octal anymore?).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 11
(3,324 Views)

Ohhhh okay that makes sense. I also found out that since I have a case statement with my array that way the user could choose binary or hex, my default is binary and when I right click on that array's properties, the display style has normal, \code, password, and hex, so this will work for me since I can just use normal or hex. Thank you very much for the help. I appreciate it.

0 Kudos
Message 6 of 11
(3,315 Views)

@Szklanam wrote:

...when I right click on that array's properties, the display style has normal, \code, password, and hex, so this will work for me since I can just use normal or hex.


Ah, so you are using a string.  You can still use the same trick for those now.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 11
(3,311 Views)

I fooled around a little bit and it was much cleaner using an integer and applying radix to the indicator instead of the "Number to Hex" and the "Format Value" for the hex and binary conversions respectively Smiley Happy

0 Kudos
Message 8 of 11
(3,309 Views)

@crossrulz wrote:

That's because your data type is a floating point.  You have to have an integer type (U8, I8, U16, etc.) to be able to display hex, binary, or octal (who the heck uses octal anymore?).



I'm curious.  When was octal ever really used?  Were there particular situations where it made sense to use it?

0 Kudos
Message 9 of 11
(3,301 Views)
Wayback mode. Assembly had 2^3 instructions made sense then

"Should be" isn't "Is" -Jay
Message 10 of 11
(3,293 Views)