An interesting property of
Easy Chart is the ability to bind, that is, to dynamically link elements of the
project. In this post we will show you how to do this using a dropdown
list to show the graph of the selected element. This method avoids code
repetition and is very effective when there are several objects of the same
type, for example Temperature Probe 1, 2, 3, Motor 100, 101, 103, etc.
- Create a window with an Easy Chart and a
dropdown list.
- Insert the repeated elements in the
dropdown list. They must be written exactly as in the path used by
the program, as this will be the text (String) used for the dynamic
link.
Index int values in function of the label "Sensor 1".
- Click and drag on an object in the series as an example. In this case, Sensor 1. Remember that to use Easy Chart, the Tags must first be enabled with History, as shown in the post , which we verified with the clock icon next to the Tag.
- Click on the Easy Chart and configure the bind, the league, clicking on the Tag pens property (click on the clip on the side) changing the Tag path dynamically in the Cell Update section . The path shown in yellow represents the dynamic link and corresponds to the selection in the Dropdown list, in this example "Sensor 1".
Note : If the Tag pens property
is not showing in the Vision Property Editor, click on the filter and check that All is selected.
No comments:
Post a Comment