Using Easy Chart

Hi,
I am new to Ignition and I’m using the PLC simulator provided to get some experience.
I was trying to plot an Easy Chart but is not plotting the data.
My question is do I need to set-up a DB connection for this to work?
Am I missing something?
please see below the snipshot
Thanks
Erik

Yes you need a DB. MySQL is free. Once setup right click the tag and enable history stored on it, then drag over to easy chart.

https://www.inductiveuniversity.com/videos/set-up-tags-to-log/7.9

https://www.inductiveuniversity.com/videos/basic-easy-chart/7.9

1 Like

Side note, if you’re on 8.0.4 or greater (it looks like you are) you can use the internal historian provider: Internal Historian Provider Docs

Basically, it allows Ignition to store the tag records in an internal database, instead of an external SQL DB (which you would need to install). The internal historian isn’t idea for production environments, but it’s fantastic for learning to use Ignition without needing to install something else.

But yeah, once your gateway is either connected to a SQL Database or has an Internal Historian configured, you can enable tag history on your tags, and you’ll have your trending. The videos Matrix_Engineering linked are still valid, but the UI has been changed recently, so the user manual might be helpful here: Configuring Tag History

thanks for the quick reply @Matrix_Engineering and @Paul.Scott .
I implemented both solutions (MySQL and the internal historian provider) and it worked.


what are some interesting next steps for learning that you think could be useful?
I thought about creating some templates with the Easy Charts for example…
Also is it possible to see this historical data in the DB?because I haven’t created any table in the DB, so I wondered where is all this data logger…

Awesome!

Hard for me to say, but yeah looking at Vision templates might be a good next step. You may want to dabble around in Perspective too, just to get an idea of how it differs from Vision.

You can, with that MySQL connection (sadly, there isn’t an easy way to view the contents of the internal historian at this time). In the designer, open the Database Query Browser (Toolbar > Tools menu > Database Query Browser).

The Tag History system makes considerable use of table partitioning, and you can find a summary of the various tables used by the system here: Tag History Table Reference

If you’re looking for data to be stored in a more compact form (meaning a single table), then you may want to learn a bit more about Transaction Groups next. They actually do a bit more than just store history, and most folks find them fairly useful.

1 Like

Missed it in my last post, but the Tag Historian module automatically handles table creation and maintenance.

thanks Paul,
I have a question about the storage of the data into the DB.
In this example I’m logging data from 4 different sources (i.e. 4 different motors).
But when running a query in the DB how do I know which data comes from each motor?
in the DB it seems they all have the same tagid?
Best regards,
Erik


I probably looks like a single tagid because you turned on history for that one tag first. Try that raw query with an “ORDER BY t_stamp DESC” to get a sample of recent records.

1 Like

it worked thanks.


How can I use this data now and the management of the tables will be handled in automatic mode?
Is it advisable to move the tables to a backup/historian before the data is automatically deleted (I believe after 30 days)?
Thanks

1 Like

Well, if you use the tag historian and its automatic tables, you generally should not be querying those tables directly. Use a tag history binding on tables or the classic chart, a tag history pen in the Easy Chart, and system.tag.queryTagHistory() for any scripted access. The structure of the historian’s data storage in your DB is not intended for user access.

If you need user-comprehensible DB tables, consider using Transaction Groups (SQL Bridge module), named queries for tables and the classic chart, and database pens in the Easy Chart. You will then have traditional table structures that you can (and will have to) maintain yourself.

If you’re new to MySQL, take a look at using MySQL Workbench. I find it to be an invaluable tool and I use it side-by-side with Ignition, especially when developing some of the less trivial SQL statements (e.g. JOIN statements.)