10-17-2014 02:51 AM
Hello..
I want to convert a 8 bit binary number to hex string.
Examples;
binary- 00000000 -> 00 (Hex)
binary- 11110000 -> F0 (Hex)
binary- 01110000 -> 70 (Hex)
And the Hex STRING should be 1 Byte.
I tried but its not showing the exact string as above.
Please help.
I have attached the VI.
Solved! Go to Solution.
10-17-2014 02:59 AM
10-17-2014 03:08 AM
08-02-2017 11:25 PM
@GerdW wrote:
Hi Nayan,
can't open your VI here, but your question translates to this snippet:
Can you please specify the 2nd node used(between numeric control and byte array to string converter)
08-03-2017 01:16 AM - edited 08-03-2017 01:35 AM
Hi sajipk,
what I posted is a snippet: you can drag it onto a block diagram to get real code!
What does that node?
Let's look at the snippet: At the input it gets an array of U8 (depicted in the function icon by "[U8]") and at the output you get a string. Obviously it's a conversion function… (Hint: search for "U8 array to String"…)
Edit/correction: you are talking about this function, which converts a scalar item into an array? 😄
08-03-2017 01:29 AM
The second block is a function 'Build Array'.
08-03-2017 05:45 AM
@SPK91 wrote:
@GerdW wrote:
Hi Nayan,
can't open your VI here, but your question translates to this snippet:
Can you please specify the 2nd node used(between numeric control and byte array to string converter)
This solution proves that sometimes there's just no substitute for experience. I'm pretty sure it isn't obvious to a beginner that you would have to convert the number into an array of numbers first so you can use the byte array to string node. Even less obvious is that you can use the "build array" node with just one input and output.