Indirect Easy Chart
This section assumes that tags and Tag History have been configured
To learn more, go to the Tag and Set up Tags to Log pages.
The examples below use OPC tags, but Memory, Expression, and Query tags could be used instead.
It is possible for the Easy Chart component to be indirect and point to a set of historical tags based on any parameter using the Cell Update Binding type. The following example uses the Selected String Value property on a Dropdown List component, but any property could be used instead including Component Customizers.
In this exercise, we are going to use a Tank dropdown list so an operator can select a specific tank and see the history of the level_PV and temp_PV tags for that tank. We will be using Tank 101 to Tank 105 for this example. Fill in your dropdown component’s data property as shown below.
Every tank is identical and has the same tags. They have a level_PV tag and a temp_PV tag which are set to log to the Historian as you can see by the scroll icon next to the tag name. Once you have Tank 101 selected, drag these 2 tags on to your chart so you can see the tank’s history.
Right click on the Easy Chart and scroll down to Customizers > Easy Chart Customizer and you will see that the Tag Path is pointing to directly to Tank 101. The only difference between Tank 101 and the other tanks is the Tank number in the Tag_Path. You can manually point to a different Tag Path by replacing ‘101’ in the Tag Path with a different tank number such as ‘102.’ Click OK.
Now lets use the Cell Update Binding type to change the Tag_Path. Go to your Easy Chart component and scroll down the Property Editor to the property called Tag Pens. You will notice that the Tag Pens property is a Dataset.
Click on the Dataset icon and you will see 2 rows. The second column is the Tag_Path that you need to modify for each row in order for it to change dynamically when an operator selects a different tank. Click OK.
To change an individual cell of a dataset, you have to bind a dataset to a Cell Update Binding. In a Cell Update Binding, you can select one or more cells and dynamically bind them to a property or to an existing tag in the system. To change the temp_PV and level_PV tag paths dynamically, use the following instructions:
-
Click on the Binding icon for the Tag Pens property.
-
When the Property Binding window opens, click the Cell Update button.
-
In the Dataset table, select the first row under the Tag_Path column for level_PV.
-
Click the green plus icon under the Cell Binding table. A row will be added in the Cell Bindings table for level_PV.
-
Repeat steps 3 and 4 to add a second row under the Tag_Path column for temp_PV.
-
Now, you need to update the Value column in the Cell Bindings table for each tag. Select the first row under the Cell Binding table and click the Link icon on the right side of the window.
-
When the property window opens, navigate to Root Container > Dropdown and click on the 'Selected String Value'. Click OK.
-
Repeat steps 6 and 7 to add the second row under the Cell Bindings table.
-
Next, under the Cell Bindings table, update the Value column with the folder path and tag name for each row. The first row at the top is the level_PV tag and the second row is temp_PV based on the row indexes. Double click on the first row and enter the highlighted text as shown below to match your tag paths. Repeat this step for the second row.
-
Once you added the folder path and tag name for each row, click OK.
Now the chart is indirect and when an operator selects a different tank, the level_PV and temp_PV tags will change.
Go to your dropdown list and change from Tank 101 to Tank 102. You will see the history for Tank 102 come through on the chart.
Once again, go to your dropdown list and select Tank 105 confirming that the level_PV and temp_PV tags are pointing to the correct values for that tank by looking at the Dataset property.
Next...