Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Read mySQL one line at a time

I have a mySQL file that is being added to continuously (changing length), and I am trying to read and then graph the data into LabVIEW one row at a time. I am selecting from the database using the "DB Tools Select Data" and then feeding the data into a while loop (with no stop condition). I want to read one data piece at a time into the while loop, but instead all of the current data is pulled into an array after the first iteration, which I am then unable to graph.

 

So in summary: how do I read a single piece of data from MySQL without LabVIEW reading all the data (and then clustering it into a group of 9 regardless of how many entries are read from mySQL), and how do I tell Labview to read the value after the one it just read (my data is timestamped, not indexed), and read a new value for each iteration of the while loop. Thank you!

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

Hey jacnicw,

 

When you are using the DB Tools Select Data.vi, are you inputing the column of data that you want? Maybe storing your data you want to pull in columns and pulling that data one at a time inside a while loop will work. 

 

Also, are you scanning the data into LabVIEW at the same time it is being acquired, or has the data already been saved in the mySQL file and you are now trying to pull it into LabVIEW?

 

Thanks,

Michael 

0 Kudos
Message 2 of 2
(3,134 Views)