In Ignition it is possible to
edit some parameters of the Easy Chart.
- Before you start, it is important to know
the identity, or tagid , of the tag that interests
us. One way to verify this point is to look at the sqlth_te table in
MySQL:
SELECT * FROM test.sqlth_te
This table contains important
information from the Tags, for example:
id, tagpath and timestamp of the
creation date. Remembering that the date is in Unix format and can be converted
using online converters.
In this example we will use some tag ids, which are two random BOOL tags.
Note: In the graphic above,
the Easy Chart Customizer configuration was Style Digital and Digital Offset
True.
In
Tools> DB Query Browser we can see the data being logged into the
DB. The data is logged in the DB when changing the value, that is, in this
example of BOOL variables, when the Tag goes from 0 to 1.
SELECT tagid, intvalue, t_stamp
FROM sql_data_2_2021_01
WHERE tagid = 1 OR tagid = 2
LIMIT 100
FROM sql_data_2_2021_01
WHERE tagid = 1 OR tagid = 2
LIMIT 100
In
Ignition, in the properties of Easy Chart we can edit the Poll Rate (frequency
of acquisition of Tags in ms for the chart). In the image above, the Poll
Rate is 1000ms (1s), and in the image below the Poll Rate is 10000ms
(10s). The graphic is the same, what has changed is the time to update the
image. In this case, it updates itself every 10s. What happens
between two updates is saved in the DB, so the information is not lost, as we
can see in the variation of the signals below.
There
are two main modes of operation of this Chart: Realtime and
Historical. The first shows the data dynamically in real time and the user
can do a Zoom-in or Zoom-out of a few minutes (this was the mode used in the
examples above). The second shows the data in a static way and the user
can select a time range to go back in time.
Both
modes have parameters that can be edited in: Historical Range / Realtime Range properties
Inserting
dropdown list to select the Chart mode from the HMI page.
First insert the Dropdown list of the Input components and define the table (index int value and label text).
First insert the Dropdown list of the Input components and define the table (index int value and label text).
Then
do the Bind, ie the link between the Dropdown list created above with the property
that we want to select from Easy Chart. In this example, the property to
edit for the Easy Chart instance is Behavior>
Chart Mode> Property> Selected Value , which corresponds to the
index created in the Dataset of the Dropdown list.
Upon
completion, a clip icon will appear next to the Easy Chart, indicating that it
has properties linked.
No comments:
Post a Comment