From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
James_McN

Change Hex Display Prefix from $ to 0x

Status: Completed
This feature was just released with DIAdem 2012. You could use the format instruction 'str' to do the following: Use '$' to display numeric values in hexadecimal format. If more characters follow after the first $ character, DIAdem uses this character as the prefix for the result, for example: Call MsgBoxDisp(str(1234,"$0x")) ' => 0x04D2 If further $ characters follow after the prefix, these characters indicate the number of places. DIAdem interprets all characters behind the last $ character as postfix, for example: Call MsgBoxDisp(str(1234,"$ $$$$$$$$hex")) ' => 000004D2hex If no further character follows after the first $ character, DIAdem shows the number to be formatted as a hexadecimal value and uses the $ character before the numbers as ID for the hexadecimal display: Call MsgBoxDisp(str(1234,"$")) ' => $04D2

The DIAdem prefix for hex data is $ and as I am aware you must use this.  Most programs use the prefix 0x.  There should be an option to chose one, the other or none.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
3 Comments
Brad_Turpin
Trusted Enthusiast

Hi James,

 

You are absolutely correct.  The "0x" syntax is the dominant one I see everywhere.  DIAdem should indeed consider this.

 

Thanks for submitting your idea,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Otmar
Active Participant
Status changed to: Under Consideration
 
Otmar D. Foehner
dietfons
Member
Status changed to: Completed
This feature was just released with DIAdem 2012. You could use the format instruction 'str' to do the following: Use '$' to display numeric values in hexadecimal format. If more characters follow after the first $ character, DIAdem uses this character as the prefix for the result, for example: Call MsgBoxDisp(str(1234,"$0x")) ' => 0x04D2 If further $ characters follow after the prefix, these characters indicate the number of places. DIAdem interprets all characters behind the last $ character as postfix, for example: Call MsgBoxDisp(str(1234,"$ $$$$$$$$hex")) ' => 000004D2hex If no further character follows after the first $ character, DIAdem shows the number to be formatted as a hexadecimal value and uses the $ character before the numbers as ID for the hexadecimal display: Call MsgBoxDisp(str(1234,"$")) ' => $04D2