LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decimal to Hexidecimal sub-vi

Hi All,
 
I need to convert decimal to hexidecimal, so as to input this to an array. I've tried the solutions posted already for a similar problem, but they aren't suitable.
 
I cannot use the number to hexidecimal string function, as I need the output as a single number, not a string.
Also writing the decimal number into an indicator, and changing the number type to hexidecimal is not an option, as I would then need to use a local variable to read this value to an array, but this isn't a good idea as I need to do this for many numbers at the same time, (I am trying to send data to CAN).
 
Hence is there a simple way to create for example a sub vi, which takes in a decimal number, and outputs it as hexidecimal?
 
Cheers,
 
Emmanuel
0 Kudos
Message 1 of 3
(2,648 Views)
If you're writing a number, then why do you need any conversion. Decimal, hex, octal, etc. is just a visual representation of the same number. Change the format does not change the actual number being written. I've attached a picture of some VISA register writes that I've been doing a lot of lately. The format of each is different but they are all writing the exact same information.
Message 2 of 3
(2,626 Views)

Thanks, you're right! I thought that I needed to input the data in hexidecimal format, as I'm dealing with CAN, but it will accept it as a regular number!

Emmanuel

 

0 Kudos
Message 3 of 3
(2,603 Views)