LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read txt file and plot graph

Good day, I am new to LV after all  ( okay, I have been using it loong time ago  >6 years) so I remember almost nothing from it.  I have found that on my old PC I still have LV8.6 installed.  

 

I would like to kindly ask for help, if anybody here can make me simple VI, so that I can start laboring with it. 

 

I have Arduino, which reads 2 analog pins and sends the raw values directly to serial port. 

output is at baud 230400/8N1   with CR/LF at end of line and looks in this way : 

 

1023,475

375,48

478,1010

.....

 

it is delimited by comma.  

What I would like to have is : 

 

Read the selected comport 

Assign Timestamp ( actual PC time, with millis resolution) to each received line

Simultaneously plot the chart for the two values separately

Be able to select whether to store the data as file. 

 

Just to note, the data are given every cca 500us to the port, so saving a file is maybe a future and not neccesary now. 

 

Can anybody help ? Sorry for my english. 

 

0 Kudos
Message 1 of 2
(2,198 Views)

Here is a snippet to get you started.  But thinking about your requirements, 500us is fairly fast for a serial port.  If you do add logging, you will definitely need a Producer/Consumer setup.


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 2 of 2
(2,177 Views)