LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
AristosQueue (NI)

Give numeric control a radix display option of "ASCII"

Status: New

Taking this comment and making it an idea on its own.

 

Numeric controls can be configured to display their value today as SI Notation, decimal, octal, hex or binary by enabling Visible Items >> Radix and then setting the radix ring to the desired value.

 

This proposal is to add a new option to the ring for unsigned integer types: ASCII. This would cause an integer to be displayed as a series of characters as each byte of the integer is interpreted on the standard ASCII table.

 

(If in the future LV improves support for unicode string handling, adding a radix mode for "Unicode" might also be good, though at that point you'd have to specify an decoding to use for the individual control)

 

Note that adding this option to the Radix ring would really invalidate calling it "radix". Having "SI Notation" in the ring is already stretching the definition, but this would push it over the edge, so we might want to call it "Display format" or something like that. Or perhaps there's an alternative way of specifying this display mode that would be better (everyone, put your suggestions in comments below), but the main thrust of the idea is to let a number be shown using its character interpretation.

4 Comments
TCPlomp
Trusted Enthusiast

For which data-types is this valid?

Would this mean that internally the data type-casted to string and shown?

 

How would -1 look on a I8 and -1 on a I32? 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
AristosQueue (NI)
NI Employee (retired)

Take the bytes of the number in endian order (yes, that's spelled correctly) and interpret each one as an unsigned byte value mapping to the ASCII character table.

Michael_78
Active Participant

I have wanted 'Fixed Length Strings' for use on FPGA for some time, mostly when working with serial communications modules.  Allowing strings on FPGA would probably be a bad idea as they would not work like strings on any other platform.  This idea would be an ideal solution as it would maintain the true data type while making the VI easier to read and debug. 

Intaris
Proven Zealot

Oh Michael, I'd love fixed-length strings (and arrays) on the PC too!!  Not just FPGA.