LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real time plot (read thru serial).

I still having some problems with the VI. The VI is working but after some time it shows an error (it says that the string is not in the correct format, but when I monitor the serial port with the program tera term I can see that the data is shown properly). I don´t know whats hapenning. Can somebody help me? The VI is attached. Thanks

0 Kudos
Message 21 of 22
(282 Views)

The error is because the scan from string may not have values for each of the expected commas in the input string.  That likely occurs when you did not fully read the serial port. 

 

I would recommend that you have a routine (sub-vi) that reads the serial port.  You would do this in a loop which keeps reading the port until you know that there is nothing more to read.  |I have posted examples of such ocode on the forum.  Then feed the input string of the "scan from string" function.

 

link to example

0 Kudos
Message 22 of 22
(265 Views)