on 2007 Sep 12 9:01 PM
Hi,
I have to create a display template bar chart using 5 tags in a tag query which are Run time, Setup time, Green Light time, Red Light time and Yellow light time. This is no problem to do. But I have to duplicate the chart for 24 machines or nodes.
My question is, do I have to create 24 query templates and 24 display templates for each node or can I paramaterize the node number which in the case below is 11 inside my tag query template?
An example of a tag is OPCSERVER.USBtoCAN.Node 11.RunMinutes
Any info will help as this will be 1 of many sweet charts and graphs I will need to create per node.
Thanks
Mike
Request clarification before answering.
Mike,
Create a simple web page with an irpt file extension with this in the body:
<APPLET NAME="Node<b></b>Chart" CODEBASE="/Illuminator/Classes" CODE="iChart" ARCHIVE="illum8.zip" WIDTH="640" HEIGHT="400" MAYSCRIPT> <PARAM NAME="QueryTemplate" VALUE="Defaults/TagQuery"> <PARAM NAME="DisplayTemplate" VALUE="Defaults/iChart"> <PARAM NAME="ChartType" VALUE="Bar"> <PARAM NAME="Title" VALUE="Node <b></b> Chart">
<PARAM NAME="Server" VALUE="Simulator">
<PARAM NAME="Mode" VALUE="Current">
<PARAM NAME="TagName.1" VALUE="L<b></b>Speed"> <PARAM NAME="TagName.2" VALUE="L<b></b>Yield">
<PARAM NAME="TagName.3" VALUE="L<b></b>OEE"> <PARAM NAME="TagName.4" VALUE="L<b></b>Availability">
<PARAM NAME="TagName.5" VALUE="L<b></b>Performance"> </APPLET> Then call the page such as http://server:port/path/Hamel.irpt?Node=1 You can vary the Node number in the URL request (perfect for a drill down popup page, etc.) which will in turn dynamically adjust the Simulator chart name, title, and values from Line 1, 2, 3, 4. I made this sample for you without any special templates, but for simplicity I would recommend setting up your base query and display how you like them in the editors and then only including the actual PARAM statements above that incorporate the <b></b> token.
Notice that the Chart will display them automatically (no need to make separate query or display templates).
This way if your tags are named exactly the same except for the node number you have an infinite number of possibilities, but only one page.
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jeremy,
Your posts helps, as I am working on a similar issue but I still have a few questions. From what I can tell, the tag query must be set up with the tags pre-selected on the Tag Query Details tab.
Is it possible to set up a tag query pointing to a particular server (IP21 in our case) and pass in the tag names dynamically from the UI w/out selecting any tags in the query?
In my testing so far, I can set up the tag query with say 5 tags, and then use any of those values dynamically from the page, but I cannot add a 6th tag.
My overall Idea is to create a BLS transaction w/ Tagnames as inputs from the UI...pass these from BLS into the Tag Query(Current Value) and then build one XML file with the results for display on the UI (bound to a grid)
The XML returned from a current tag query has one table/rowset for each tag.
let me know if this doesn't make sense
thanks in advance
Jeff
Jeff,
You don't need BLS for this - that's what the example I shared was to demonstrate. In your scenario, with 1 or more tags in a given IP21 query template, the <PARAM/> line with TagName.x will override the value in the template. So, if your query template has a tag called FOO in it, and in your html page in the applet definition you have <PARAM NAME="TagName.1" VALUE="xMIIRules"> the query will hit IP21 for a tag called: xMIIRules since it has overloaded what was in the original query template.
Don't be concerned with the separate Rowset structures (one per current tag), because the iChart and iGrid applets will deal with this just fine.
Regards,
Jeremy
first of all, can you respond quicker...I mean 9 minutes is unacceptable.
I understand the concept using the iGrid, but I am using a different UI control(.Net of course), so I will be calling the query via URL and binding the returned XML to a gridview..
My hope was that I could just build a generic Tag query(w/out any tags selected, only connection info) and then pass in the tag values from the UI. This will allow me to handle the tag names(which will vary from page to page and site to site) outside of the Query.
Is my design wrong and/or is this possible..
thanks
Jeff
I'll check back in 8 minutes
I got it working, was having some caching issues...basically using this URL call will allow me to dynamically pass in the tags. and I don't have to have the tags selected in the query
Jeff,
Note, that this might be easier for you to construct the URL, and using the TagName comma delimited list only works when calling the servlet directly (since the query template has indexed tagnames). A query template is just another name/value pair that just happens to contain other name/value pairs.
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.