LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I convert an 8 bit serial data string I have received (say 01110101) into decimal format??

I am having a hard time finding a function that will help me convert an 8 bit serial data string I have received (say 01110101) into decimal format.
0 Kudos
Message 1 of 5
(2,835 Views)
Use Scan From String with %b as the format string.
0 Kudos
Message 2 of 5
(2,835 Views)
Dear Dennis:
Thanks so much for your response. This question might sound silly but I have been using the vi templates provided by ni so far to build my program.
I am therefore having a hard time to find the "numeric output function" that would receive, store and display the output of "Scan from String function".
Also, is it %b or %d and what container is that supposed to be in?
Thanks again for your help.
0 Kudos
Message 3 of 5
(2,835 Views)
When you have your front panel displayed, you should a whole palette of controls that you can place on the front panel. If the palette is not displayed, thne just right click on your mouse and it should appear. The upper left most set of controls on the palette is Numeric. Go there and select Numeric Indicator to display a numeric output. On the diagram, you can also right click the output 1 and select Create>Indicator. The format string is %b (as in boy) for a binary string. As I said, this should be the value for the format string input. You can right click on the Scan From String and select Edit Scan String. This will bring up a dialog box in which you pick what you want to do (Scan Number) and how you want to do it (Scan Binary Integer
).

It sounds like you really need to take a course in LabVIEW programming. There are are links here to NI classes and some on-line tutorials.
0 Kudos
Message 4 of 5
(2,835 Views)
Hey Dennis
I really appreciate your quick response. Thanks alot for your help. I figured it out. I will also look into the 3 hr online course you sent me.
Thanks again and have a gread day.
0 Kudos
Message 5 of 5
(2,835 Views)