LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert data received in USB port

I need to read in values the data received in a string through the USB port of an Arduino MKR 1010, specifically required in USB port is a stream of strings composed of a timestamp and a digital value (24 bits) reading from the ADC.

I think i need convert the stream of strings but i do not who i make this.

 

this is my code to receive the stream.

 

The data received

smalhao_0-1575476284882.png

0 Kudos
Message 1 of 24
(3,132 Views)

We don't either because you haven't provided us any example as to what the data from the Arduino looks like.

 

If they are human readable ASCII based strings, then look in the String palette for "Scan from String".

0 Kudos
Message 2 of 24
(3,124 Views)

I put the image of data received in the question, i make an edition of de question

0 Kudos
Message 3 of 24
(3,120 Views)

Okay.  I see you edited the message after getting mine to add that.

 

Now, it shows you are getting a string of characters, all digits.  "8516308"

 

What does that represent?  If you do a scan from string with a %d, you'll get an integer with a value of 8516308.

 

Is that what you want?  If not, what do you expect the answer to be?

0 Kudos
Message 4 of 24
(3,094 Views)

This values in read buffer is a stream of strings, this stream contains a timestamp and a digital value (24 bits) obtained through the Analogic/Digital Converter, and i my need convert the value in read buffer for two double numbers and apply in value of tension received through magnetoresistive sensor and apply in the Labview code the FFT block and the Power Spectrum for see the small frequencies detected in sensor.

0 Kudos
Message 5 of 24
(3,048 Views)

I can say basiclly i need to decode the stream of strings

0 Kudos
Message 6 of 24
(3,032 Views)

Since there is a zillion squared possible encoding schemes, how do we know which is the right one?

Sure there is a program running on the Arduino board that reads the ADC values and generates the string stream.

The author of this program could explain how to interpret the output (unless it's obvious, but this doesn't seemms to be the case).

Don't you have any documentation about it?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 7 of 24
(3,023 Views)

Yes exists one programa inside of Arduino and i do not have any documentation of the mode of interpreting the output and i not have the contact of author of code only know the timestamp and the value of tension read in sensor is digital.

0 Kudos
Message 8 of 24
(3,013 Views)

Do you know what the value you show is supposed to be?

 

If you receive data and know what it should be, then there is a chance to reverse engineer the method they are encoding and transmitting the data. That doesn't mean telling us it is a time stamp, and 24 bit data.  It means "that value represents 1:03 pm and a value of 54321."

 

If you don't know what what the data should be, don't have the source doe, don't have any documentation, and can't get a hold of the developer, you might as well throw the thing in the trash.

0 Kudos
Message 9 of 24
(3,009 Views)

Yes i know the value supposed be, is more or less like this:

 

"05/12/2019 11:58:42 0,455149" -> This is an example, the value 0,455149 is a value of tension and the  05/12/2019 11:58:42 is the timestamp.

 

And i need the value of tension for apply FFT method.

0 Kudos
Message 10 of 24
(2,997 Views)