Description

See an example of a simple Transaction Group that stores data historically to a database using a custom table structure.

Video recorded using: Ignition 8.1

Transcript

(open in window)

[00:00] The most straightforward way to log data with a Transaction Group, is to use the Historical Group. This is a very simple type of group that maps data from OPC into table columns for the purpose of inserting rows into a database table. To show you how it works from my Transaction Group Design space, I will create a new Historical Group and I will name it "My Group". On the left side is our OPC browser where from the Designer, we can browse down to the devices currently configured in our Ignition Gateway. From my Simulator Device, I will select a few tags and drag them over to my newly created historical group's OPC items list. Notice how they are automatically brought in with a few default configurations. The most notable setting is the target name, which translates to the database table column name, that this specific OPC data point will be mapped to when it is stored. However, it is possible to have the target name be Read Only. When set to read only the value of the item will not be tied to any columns in the database, but is still visible from the Transaction Group and can be used for something like a trigger for instance. At this point, I can make the target name anything I want, and the group will automatically take care of creating the table for me with the column names to match my target name settings. If the table already exists, the group will take care of adding any additional columns needed. So I'll configure my table name to be "My Table," and I'll leave the default column names as they are. This is really all I need to do. With the timer one second, I can enable the group and save my changes, and the group will begin running. Remember, this table didn't exist before I started the group. And yet, now we can come in and see the value streaming into the database every second. Of course, I may want to log at a different rate or to only store data on a condition through a trigger. But in regards to storing basic OPC data to a database, This is all that is required.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.