on 04-29-2013 6:09 AM
Hi Friends,
I have requirement to present live data from SQL database into MII server in the form of Line Chart . I could able to present live data in Bar, Grid and other chart types.
( OPC is connected to SQL database, Using IDBC connector, established connection to MII server)
Somehow, I am unable to present live data in the form of Line chart. with same parameter settings, I could acheive using tag query and present a line chart.
with Line chart using SQL query, I am getting only grid screen with out any trends.
I want to know whether it is possible to present Line chart for a SQL query . Please let me know if i need to do some workaround.
As I am very new to MII environment, I also request forum, to show some links on SPC chart types ( blogs or small examples from your workplace).
Thanks,
Suman
Hi Suman,
First, answer to your question if we can plot a line chart with a SQL qry is Yes, we can plot any type of chart with either a SQL,TAG or Xacute qry.
Before suggesting any workaround to your issue, can you please tell if you are plotting the data against some Date Time value?
Warm Regards,
Anuj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suman,
Wow thats cool 🙂
I had also faced this issue way back in which I was able to present data in a bar chart but wasnt able to present the same data in a line chart.
If I remember correctly, the way out to this issue was something related to DateTime format. I would suggest you to first try with your 'Datetimestamp' column in the XML date format (yyyy-MM-ddTHH:mm:ss) and then play around with other non XML formats because I am not able to recall the exact solution. And make sure that the DateTime format you are mapping to your chart template matches the one defined in the X-Axis tab of template.
Hope this will get you something!!
Warm Regards,
Anuj
Hello Suman,
When in trouble always start with something very simple and basic, this is how I would try to debug,
1) First take a simple Query with few records say 5 or 10 even better if you can start with only two columns like Datetime stamp and Value columns
2) Take a brand new iChart from Display template ( do not copy from any existing template because some items might be set that chart doesn't like)
3) Then on Data Mapping tab, Add your Value Column/s to Value Columns section, having Value column as numeric is preferred not string
4) Convert your Datetime column to varchar2
5) Then go to X-Axis tab, Add the datetimestamp Column to X-Axis Label Columns section
6) Once the basic setup is working then start playing or experimenting with it by changing item by item
Try something like above this should help you to understand and debug.
Good Luck!
Regards,
Adarsh
Dear All,
Thank you very much for your support.
I think line type will not work for current mode type for any connector( not sure..). I have done some testing using SQL query and also using Simulator server.( tag query with only history mode works).
My problem got fixed after changing the current generation table( instant values from shop floor, only one record at a time ) with another history table( 2 mins delay history table with n number of records).
Want to know from the forum, instead of single record(live date) does line type chart works for only bunch of records ?
Is there any way , I can present live data( single record) in the form of Line Chart?
Thanks,
Suman
Hi Suman,
I dont think that plotting a line chart for a single record will be a good idea.
Anyways, to answer your question, number of records has nothing to do with the chart type. But if you have a single record, you wont be able to see any lines plotted in the chart area, rather you will see a single marker because atleast two data points are required to see a line (basic geometry 🙂 ) in the chart and I think you must be getting this single marker in your chart area for that single record.
Best Regards,
Anuj
User | Count |
---|---|
11 | |
6 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.