LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading multiple sensors and representing them from Arduino Serial Monitor to LabView

Solved!
Go to solution

Hey so I'm trying to use some sensors from an arduino I own, basically temperature, acceleration and orientation, I made it so it sends all the information packed like this

cinco_ja_0-1716533522516.png

From there I tried breaking that string into the different numbers and then using those for the graphs and other stuff, but every time I tried something different it didn't work, I have no idea what knowledge I'm lacking from all the documentation all over the place or from what I could learn or do better

cinco_ja_4-1716533690883.png

 

 

 

0 Kudos
Message 1 of 5
(240 Views)
Solution
Accepted by topic author cinco_ja

Hi cinco,

 

"Spreadsheet String to Array" could be the answer for extracting measurements from the received string.

PinguX_0-1716534754860.png


Try that in first place, then see if you wouldn't need another patch (for example on VISA Read).

0 Kudos
Message 2 of 5
(231 Views)

Yeah so that's the solution, I input the string and it sends out all the different numbers in an array, but since I am sending all the data from serial into a string at spits it out in lines and lines and lines, the spreadsheet data to array function doesn't take in the newest line and uses that, but when I separate a string of data and push it, it works, the problem is that I have no idea how to constantly separate the newest string of data onto the function, send it out and continue the loop

0 Kudos
Message 3 of 5
(172 Views)

Hey yeah so I solved it all, but why did you use %.2f as a way for it to be represented? instead of %f, because that doesn't work, sorry for the inconveniences!

0 Kudos
Message 4 of 5
(143 Views)

For no particular reason, just the habit of specifying the exact format of the input string.

 

Which doesn't work in your case ? "%f" or "%.2f" ?

0 Kudos
Message 5 of 5
(106 Views)