LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

differentiating variables on serial port

So Im using aan arduino and labview to make a poer meter for a project.  it takes in 2 analog voltages, calculates power and then outputs V,I and P through the serial port.  Labview is then supposed to display all 3 in seperate boxes and graphs them in their own graph in real time.  I have never used labview before and I have no idea how to then take the stream of serial data and chop it into the 3 peices I need. I found a VI online that had an arduino serial port setup as well as LIFA and got both of them to work with only 1 variable.  Can anyone help me chop it into 3 peices?  Thanks in advance 🙂

 

-Tyler Gehring

0 Kudos
Message 1 of 3
(2,418 Views)

Hi Tyler,

 

when using the BasicSerialReadWrite-ExampleVI you should get some data from your arduino. Then you should already know which char is used as delimiter between the values (or: you should know the formatting of the serial data stream) so you can use any appropriate string function to parse the arduino data...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,415 Views)

Hi Tyler,

 

If you are looking to split your array into decimal numbers you can use Spreadsheet String to Array.vi or you can use the Scan From String.vi.

 

Good Luck!

 

 

Regards,

Mike Altmann
Product R&D
NI
0 Kudos
Message 3 of 3
(2,389 Views)