This blog is dedicated to open, interoperable manufacturing software and the coolest, latest and greatest things I see every day while conducting business under the banner of Inductive Automation.

Hello, my name is Steve Hechtman and I am president of Inductive Automation. During the span of one day there is more excitement, more discovery than I can possibly keep to myself. This blog is, therefore, my outlet. WARNING: This site is highly biased in favor of the most powerful, affordable manufacturing software in the world - Ignition by Inductive Automation!

Ignition Playback Templates

The other day I was wondering if I could create SCADA "playback" using standard Ignition components. I decided to try by using Ignition templates to create a "playback controller" and "playback container"  so that a controller could be dropped into a project and containers be bound to it.  Each container would contain a single SCADA object such as a gauge, tank, readout or whatever.

This turned out to be a really easy project (with a little help from tech support).  First, history needs to be turned on for each tag to be played back.  It just takes a check mark on the tag.  This can be done en mass with the multi-selection of tags.  Dropping the controller into a project gives a bindable property called Date_Time".  This property provides the date and time to display and increments forward from the selected start time at the playback speed selected.  That's all the controller does - specify time (selecting "RT" means realtime, gives the improbable year of 1900 which tells the containers to display realtime directly from the tag value.  I only wanted a single property to bind to).  The "playback container" uses the date and time from this property to query the tag historian for a value.

The "playback container" has some display objects on it which exist only for demo purposes.  Make a copy of this template, delete all the display objects, and add your own display object. Bind your display object's value to the container's "Value" property.  Now drop your new container object into the project as many times as you want.  For each container fill in the "Tag" property with the tagname. If the default database for your project is different from your History Tag Provider, add the name of your history provider in front of the tagname.  For example, [MyHist]N7:0.  Otherwise, just the tagname will work.  Then bind the container's "Controller" property to the "Date_Time" property of the controller.  That's it.

Selecting a date/ time out in the future will give the current values as they are logged because the query is configured to select the "Closest Value" (and the current value is the closest to any future value).

I exported these templates to a .proj and you can download them from here.  I built them in Ignition version 7.6.3.

DISCLAIMER:  These templates should not be considered "production ready" nor should they be considered a product of Inductive Automation.  They were just a "proof of concept" and I was just "an integrator having fun messing around."  It didn't take long.  Just dissect them and see how I did it. There are probably many other ways to accomplish the same thing.

No comments: