LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot waveform or graph using table database which connecting the Mysql database already.

Hi I am doing my Final Year Project, Now I have finished the connection between Mysql and labview. I can display the sql data in labview table.Now I need to use table data for plotting waveform but I tried many times cannot work.So can somebody teach me how to plot waveform using table data.Thanks.!!!!

0 Kudos
Message 1 of 18
(4,620 Views)

Thanks for any help. I appreciate for it.

0 Kudos
Message 2 of 18
(4,609 Views)

Hi,

   Tables are stored as 2D arrays of strings. If your data has numeric values encoded as strings, then you can turn them back into LV numeric data and then plot them. First you use index array to select one column of data. Then you use fractional string to number to turn it into an array of doubles. You can then plot this on a waveform graph. If you have two columns and you want to plot one vs the other, then repeat the process for the second column and use an xy graph instead. See the attached vi as an example.

 

Have fun!

Message 3 of 18
(4,588 Views)

very appreciate for your help.And may i know for this labview file which i dont want insert file to plot graph,I want plot waveform using the table data directly,so can u tell me how to do?thanks a lot.

0 Kudos
Message 4 of 18
(4,579 Views)

Hi may I know how to combine your one to my labview file so that it can plot the graph using the MYSQL database directly ,No need to using the text file.Thanks!!!

0 Kudos
Message 5 of 18
(4,570 Views)

sorry forget to insert my file.Hi may I know how to combine your one to my labview file so that it can plot the graph using the MYSQL database directly ,No need to using the text file.Thanks!!!

0 Kudos
Message 6 of 18
(4,567 Views)

Hi,

   I don't have MySQL installed, nor would I know what data is in your database. Here are a couple options. Take a screen shot of your table control and post it. Copy your table control to a new vi, while it's displaying the data you want to plot. Edit --> make current values default. Save and post this new vi.

Message 7 of 18
(4,541 Views)

A few questions:

1. What is the structure of the MySQL database table you are reading the data from?

2. What is the query you are using to extract the data?

3. How are you accessing the database?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 9 of 18
(4,505 Views)

Really thank you and appreciate for your help. And my table database actually is like

eg;

 Date               time         wind direction       wind speed     ....

2012-12-01   00:00:00          13.5                     0.4m/s        ....

2012-12-01   00:00:05          13.5                     0.5m/s       ......

.....

maybe more option for more data.

So May i konw  if i want my waveform graph can show  wind direction and wind speed in same graph according to table database and the X show the timing like 00:00:00-24:00:00.

If i want add some more combox for selecting the graph which I want.Eg: From what start date-End date,Start time-End time,or Category can choose wind direction graph or wind speed graph.

 

Really thank you and appreciate for your help again.

 

 

 

Download All
0 Kudos
Message 10 of 18
(4,485 Views)