Skip to Content
avatar image
Former Member

Can i use a tag as a paramater in a query template?

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 28, 2007 at 07:46 PM

    Hi Jeremy,

    I am really close to having this situation squared away. The page opens fine and I can see the bar graph layout and the title. I am not however seeing any info for the bar graph. It seems the problem starts with the Tagname.x lines.

    I created a Query Template (iHistorian/Minutes/TurnMinutesTagname )and for

    param1= TagName.1

    param2= TagName.2

    param3= TagName.3

    param4= TagName.4

    param5= TagName.5

    I also created Display Template (iHistorian/Minutes/AllTurnMinutes) and used TagName.1,TagName.2,TagName.3,TagName.4,TagName.5 from Query Template

    (iHistorian/Minutes/TurnMinutesTagname) for Value columns. To me it seems correct, but do you see any problems?

    Thanks

    Mike

    <APPLET NAME="NodeChart" CODEBASE="/Illuminator/Classes" CODE="iChart" ARCHIVE="illum8.zip" WIDTH="640" HEIGHT="400" MAYSCRIPT> <PARAM NAME="QueryTemplate" VALUE="iHistorian/Minutes/TurnMinutesTagname"> <PARAM NAME="DisplayTemplate" VALUE="iHistorian/Minutes/AllTurnMinutes"> <PARAM NAME="ChartType" VALUE="Bar"> <PARAM NAME="Title" VALUE="Node Chart">

    <PARAM NAME="Server" VALUE="iHistorianPST">

    <PARAM NAME="Mode" VALUE="Current">

    <PARAM NAME="TagName.1" VALUE="OPCSERVER.USBtoCAN.Node .AmberMinutes"> <PARAM NAME="TagName.2" VALUE="OPCSERVER.USBtoCAN.Node .GreenMinutes">

    <PARAM NAME="TagName.3" VALUE="OPCSERVER.USBtoCAN.Node .RedMinutes"> <PARAM NAME="TagName.4" VALUE="OPCSERVER.USBtoCAN.Node .RunMinutes">

    <PARAM NAME="TagName.5" VALUE="OPCSERVER.USBtoCAN.Node .SetupMinutes">

    </APPLET>

    Add comment
    10|10000 characters needed characters exceeded

    • Mike,

      Don't map anything into the ValueColumns, since your query template is a TagQuery the iChart will automatically bar chart all of your tags. This will actually work against you.

      In a Tag query template the Param.x's are not used, so don't even bother, the indexed TagName.x's come from the one you map into the list of selected tags on the right when you map them over.

      Your query template will contain the Server and Mode, so you don't need them in the APPLET PARAM's (just remove the lines). Your display template will contain the ChartType, so you can remove that extra PARAM line too. These were only there so the original example I posted worked for you.

      Besides the querytemplate and displaytemplate lines, the only ones you really need are the ones including the token number (assuming the query and display do what you want them to).

      Regards,

      Jeremy

  • avatar image
    Former Member
    Sep 13, 2007 at 04:09 AM

    Hamel

    Suppose u hv 24 nodes with their own node numbers say 1,2,3, ..,24.

    Then u better to pass the node number to the created Tag Query for that machine/node accordingly, then with that Tag Query, u can display chart (as display template) for each node with node number passing to Tag Query.

    Regards

    Som

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 13, 2007 at 06:02 AM

    Hamel,

    Create a transaction BLS

    1. Store the output of tag Query (5 tags in a tag query which are Run time, Setup time, Green Light time, Red Light time and Yellow light time) for all the 24 nodes into a document.

    2.Use a repeater to to read rowwise the output of the all the 24 nodes.

    3.Than u can display the output (Run time, Setup time, Green Light time, Red Light time and Yellow light time) for all 24 nodes in a grid.

    Hopes this helps.

    Regards

    Raman

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 24, 2007 at 08:29 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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.

      http://<server>/Lighthammer/Illuminator?Server=IP21&Mode=Current&IllumLoginName=XXX&IllumLoginPassword=XXX&TagName=42FC2028,42FC2012,40FC182&Content-Type=text/xml

      Regards,

      Jeremy

  • avatar image
    Former Member
    Oct 01, 2007 at 05:24 PM

    Jeremy,

    Ok, it makes sense now. I was mapping to the value columns in my Display template. All is good. Thanks for your help.

    Mike

    Add comment
    10|10000 characters needed characters exceeded