LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing data of HEX into EEPROM adresses with particular storage format

Solved!
Go to solution

Hello jamiva,

 

I have done the logic as per your comments, now am able to get hex from value and format specification.

 

Thanks and regards,

Nafees

0 Kudos
Message 11 of 15
(1,023 Views)
Solution
Accepted by topic author shaik89

I did one case for the inverse "Float to Hex" conversion for you. Easy to create other cases from this template. Just change the "Convert to.." function and the values of "f" and "e" as appropriate.

Just be aware that it is up to you to ensure that the floating point numbers fall within the valid ranges for the conversion type (i.e., trying to convert a negative number to an unsigned Format).

 

float_2_Hex111.png

 

 

I doubt that you will be converting only one hex or one single number at a time. I modified the code slightly so that you can work on a large, multi-value bit pattern string; or an array of floating point numbers all at once.

 

EDIT: But it would all have to be the SAME conversion format

 

Hex_2_Float111.png

0 Kudos
Message 12 of 15
(1,020 Views)

Can you save and share the vis to 2014.

 

Thanks,

Ali

0 Kudos
Message 13 of 15
(1,009 Views)
Solution
Accepted by topic author shaik89

@shaik89 wrote:

Thanks for you response,This logic was nice and simple it has reduced my code, but if i have some 35 to 40 storage formats i need to create this many cases still this works for me.

 

Thanks and Regards,

Nafees.... 🙂

 

 


Here it is. I included both conversions in one block diagram. As I said before, I only worked out one case for you. You need to do the rest for the other 40 or so cases.

 

0 Kudos
Message 14 of 15
(1,004 Views)

I have created a  logic with four cases one for unsigned 8 bit, signed 8 bit , signed 16 bit, unsigned 16 bit by making f and e as controls.

 

Regards,

Nafees

 

 

0 Kudos
Message 15 of 15
(980 Views)