LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get hexadecimal input from user?

Solved!
Go to solution

"Prompt user for input" function gets decimal number as input. Is there any way to get a hexadecimal input from the user at runtime?

0 Kudos
Message 1 of 9
(7,374 Views)

Hi mathan,

you can use a string control with Hex Display. You have to transform the string in whatever you need.

 

Mike

Message 2 of 9
(7,372 Views)

Dear mike,

 

Thanks. Actually, i had some 25 controls in my front panel and i need one specific control to get user input at runtime. That particular input needs to be highlighted so that it can be easy to identify. Like "Prompt user for input" function, if there is a dialog open and ask the user to input the hexadecimal value directly, it will be very convenient. 

Any suggestions?

 

Thanks,

Mathan

0 Kudos
Message 3 of 9
(7,359 Views)
Solution
Accepted by topic author Mathan

Hi mathan,

you can write your own input dialog. Use a new vi with a string control (hex display), an event structure, and the tranformation cod. Connect this to an indicator to write the new value into your specified control.

 

Mike

Message 4 of 9
(7,345 Views)
Could you please expand cod please....
0 Kudos
Message 5 of 9
(7,342 Views)

just add an e... transformation code.

Transform the string into the needed format before returning it.

 

Message 6 of 9
(7,337 Views)

Ahhhhhhh am very silly. Thanks for that dan_u.

 

Mike, I will try and let you know soon.

Message Edited by mathan on 01-19-2009 03:44 AM
0 Kudos
Message 7 of 9
(7,332 Views)

Hai guys,

 

I tried this one and seems to be OK. Anyway mike your suggestion is also a nice one. Thanks a lot.

 

 

Mathan

Message Edited by mathan on 01-19-2009 04:38 AM
0 Kudos
Message 8 of 9
(7,306 Views)
Here is one thing you can do. After the you has configured the "Prompt user for input" express Vi and you are happy with the look. Just right click on the Vi and select "open front panel" Then prompted select convert. Now is the express VI gone. But you have a normal VI. Take a dive into this VI and do the changes you please. You may for example change the floating point numbers to unsigned/signed integers, and the display format to hex(given that you selected number as input format). Then save this new vi as your own function. It is just a tip. If it was up to me I would have built a new VI and configured it to display as a dialog window.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 9 of 9
(7,302 Views)