Learn about the Block Group and how it can be used to write "blocks" of data into a database. The Block Group can be used to store historical data or write data arrays bi-directionally.

Video recorded using: Ignition 8.1


(open in window)

[00:00] The block transaction group is a type of group that stores data vertically in multiple rows under the columns defined. This is opposite of the standard group, which stores data as multiple columns in a single row. Beyond this distinction block groups operate very similarly to standard groups. They have all the same features such as bi-directional mode, triggers, handshakes and expression items. In my Designer's transaction group design space, I will create a new block transaction group named 'my group' and use it to write an array of data vertically into a single column of a table. We'll browse for an array of tags in one of the PLCs, my gateway is connected to. Select all the tags and bring them into the group's OPC items lists. You'll note that unlike a standard group, which will create multiple columns of data here by default. We've created a single block item that maps to a column in our table. We'll set our table name for the table name we want.

[01:02] As always, this table doesn't need to exist already. The group will create it for us when it first executes. The block item defines all of the sub items coming from the OPC server, and supports many of the features that were used to have such as scaling dead band and alarming. In addition to inserting the data, we can choose to add some additional data that might be useful to us. For example, we can store the row ID, which will provide an index for the array, and we can store the block ID which would be a unique number incrementing each time a new block is inserted. In this case, we'll insert new values and we'll choose to insert them every 10 seconds. When we start the group after having saved our changes, it will create the table and begin inserting values. In the database we can now see the rows for the first block inserted, along with the block ID and the row ID that we chose to also include. Now, every 10 seconds, a new block is inserted. As mentioned, block group supported bi-directionality, just like standard groups.

[02:03] So instead of inserting a new block, we can choose 'bi-directional DB wins' and set the group to update or select the first block. If we save the group in this state, we can go into the database and our right to the column will be synchronized automatically to the PLC. This is because bi-directional mode will ensure that a synchronization between database and OPC. Additionally, because all of the rows in the block group are stored inside of a transaction, you can achieve very high performance of writes. This makes block groups great for storing large amounts of history or bulk data from the PLC.

You are editing this transcript.

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