11-06-2017 10:43 AM
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
11-06-2017 11:16 AM - edited 11-06-2017 11:20 AM
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).
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
11-06-2017 11:43 AM
Can you save and share the vis to 2014.
Thanks,
Ali
11-06-2017 12:05 PM
@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.
11-11-2017 05:39 AM
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