sql timestamp to serialChart
-
Hello,
I have a SQL source set up that connects to a mySQL db file. I have used the test button and I have data being retreived so i feel it is set up correctly. The 1rst column is a time and date stamp then 8 columns of integers. The data was taken once per second so Ive made my query ask for a full row every second. also, ive defined the timestamp as the time overide column(hope thats right).
I have a serialChart that reads these 8 columns but still uses a to/from type date picker to select how long the charts time axis is. I dont know how to get it to use the timestamp from my SQL source as the time axis of the serialchart.
what needs to happen to acheive this?
-
Hi dgm
The chart will construct a query to fetch all data between the to/from period. But the chart will still use the timestamps from the data points.
Could you maybe use some screenshots to illustrate your what exactly you mean? -
Thanks CraigWeb,
I will get some more info.
I also am now thinking my SQL query may not be right. I m not sure if it should be incrementally getting one row per second or the whole thing .
Right now it is: select * from testfile -
this is the graph viewer I have built. I can select the source for each pen. in this case it is showing some data points from a plc. but i can with drop down , select a different source for each pen. The user will want to use this viewer to see datapoints from a mySQL database instead of a plc. Im not sure how to do this but....
i set up a SQL data source with the following :
connection string = jdbc:mysql://localhost:3306/unit1jobdata
driver = com.mysql.jdbc.Driver
Query = select * from testdata1
timestamp overide = assigned to the column containing the timestamp datathe mySQL data is from past jobs
not sure if this helps....
-
I am not sure what the actual problem is.
Is your data source working correctly?
Do you agree with the values you are getting?
Are you asking how to add the data points to the chart ? if so I would recommend using the watchlist, you can then import this watchlist to your dashboards here is a video explaining how to do it. -
Thanks CraigWeb,
I will watch