LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting string to number

Hey.

I've creating a labview program with a aduino microcontroller.

I've created a testprogram in the Arduino which sends 35Byte over to labview and should be plotted into a graph.

 

I've manage to send bytes into the Labview buffer, and read bytes as a string. 
From the "read bytes" I've sends the string into a loop which divides the string and reads one byte at the time.(substring)

The problem is with converting substring into number.

"Decimal string to number" box doesn't gives out any data.

Added a picture to illustrate better..... Please help.
Can add whole Vi. If asked.

0 Kudos
Message 1 of 7
(2,472 Views)
0 Kudos
Message 2 of 7
(2,470 Views)

Add whole vi please, otherwise it is all conjecture in trying to help you.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 7
(2,469 Views)

Hey.

Thanks for quick reply.
here is the whole VI.

0 Kudos
Message 4 of 7
(2,465 Views)

What is the data format you are sending?  I don't think you are sending ASCII numbers (judging from the picture).  So the Numeric String to Number is not going to work.  You need to use the String to Byte Array.  This will convert all of the bytes into numbers (unsigned 8-bit number to be mroe exact).  You can do your graphing and calculations from there.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 7
(2,440 Views)

Your right I don't send ASCII.

Can you show me where to put the" bytes to array" module, and connect it to the graph?
I've just so much time on it, I can't see to find the right place it 🙂
thank you for the help. 
Much appreciated.

0 Kudos
Message 6 of 7
(2,431 Views)

xalonso wrote:Can you show me where to put the" bytes to array" module, and connect it to the graph?

Use the String to Byte Array instead of your entire FOR loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(2,427 Views)