cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

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

Former Member
0 Kudos
306

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

View Entire Topic
Former Member
0 Kudos

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>

jcgood25
Active Contributor
0 Kudos

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