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.

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.

0 Kudos
Message 11 of 18
(1,213 Views)

Hi,

   Attached is a vi which plots the parameters vs time. A better chart for this data might look like this: Wind Plot , but will take a little extra effort.

 

The XY graph is highly customizable. Right click and go to properties and you can change the format for how the time is displayed, the color and thickness of the lines, etc... You can click on the X (time) axis and change the limits which would be similar to what I think you are describing about setting the start and stop times with combo box's. You could change the limits pragmatically if needed. You can right click the chart and choose graph palette or cursor legend. The first gives you some tools to zoom in and out and pan around the graph. The second allows you to place a cursor on the chart to quickly find out the exact data value.

 

Have fun!

Message 12 of 18
(1,189 Views)

One suggestion would be to rather than rading back the entire table and then indexing out the data you want, you chould consider to make the query you perform dynamic so you only retrieve the data that is of interest. That way your LV can remain more constant.

 

In terms of overall program structure, you should look into event driven programming. You want to structure your program such that changing a selection (however you choose to do that) automatically updates the graph.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 13 of 18
(1,178 Views)

Thank for u help.Really appreciate for your help.

Hi Can u explain how u get this graph and what purpose for every functions you used?Thanks very much. And may I know how to add combobox in this labview that means can choose the timing, date and categry then showing the graph which we want one.Thanks. 

0 Kudos
Message 14 of 18
(1,162 Views)

Hi sorry to ask you again. If I want my wind direcion Y axis showing in left of waveform and my wind speed Y axis showing in right of waveform,Because my wind speed rang is 0--30m/s but my wind direction rang is 0--1 only so how can I do this?Thanks. Appreiate for you answer.

0 Kudos
Message 15 of 18
(1,142 Views)
Dual Y-axis displays are very easy. Right click on the Y axis that you have now and select Duplicate Scale from the menu.
Now you will have 2 Y axes. Now right click on the new Y axis one select Swap Sides from the menu.
The only other thing to do now is to assign the plots to the Y axis scale you wish them to appear on.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 16 of 18
(1,136 Views)

Thank you for your advice.I really appreciate for it.But if I want my graph X-axis showing the timing from 00:00:00am-24:00:00 for a whole  day so how can I do that?So that my graph X-axis showing the timing and Y-axis plot the graph according to my table data.Thanks.My first colum of table is represent the timing data, Second colum represent the wind direction data,third colum represent the wind speed data.Thanks.   

0 Kudos
Message 17 of 18
(1,114 Views)

Thank you for your advice.

I really appreciate for it

.But if I want my graph X-axis showing the timing from 00:00:00am-24:00:00 for a whole  day so how can I do that?So that my graph X-axis showing the timing and Y-axis plot the graph according to my table data.Thanks.My first colum of table is represent the timing data, Second colum represent the wind direction data,third colum represent the wind speed data.Thanks.  

0 Kudos
Message 18 of 18
(1,112 Views)