Triggering history for a group of tags when one member changes

  • We are parsing a string supplied by the Ignition TCP driver.


± Message (OPC tag, the raw data, not stored)
± MachineID (expression tag, history required)
± Product (expression tag, history required)
± Count (expression tag, history required)
± Weight (expression tag, history required)

  • The device is read on the default scanclass every 1000 ms.
  • The parsed data contains the MachineID, Product, Count and Weight.

The problem:

  • Default scanclass on the individual tags triggers a record any time the individual item changes. I want to record all tags when Count changes.

What is a smart way to trigger the Historical Scanclass on change of the Message string or the Count expression tag?
Note, the tags are part of a UDT which will be used by multiple machines.

For anyone interested, we parse the strings with an expression. e.g. To extract the Weight value from the Message (raw data string) tag we use:

(indexOf({[.]Message},“Weight=”)+len(“Weight=”))+ indexOf(substring({[.]Message},(indexOf({[.]Message},“Weight=”)+len(“Weight=”))),","))

i.e. Get a substring starting at position after “Weight=” and of length (position of next comma - the start position).

Using a single trigger to record multiple values together is what transaction groups are for.

Thank you for your reply.
I suspect from my reading on the topic that the transaction groups only work when the project is running. I need to do this just on the server with no client application running. Have I missed something?

I have asked another question to see if I can do it another way.

That’s not how transaction groups work. They are a resource within projects, meaning exporting a project will export transaction groups - but they are executed constantly on the gateway. As long as the Ignition gateway is running, any enabled groups (in an enabled project) will also be running, with no client application necessary.

Thank you for that information. I wasn’t aware of that.

Am I correct in thinking that I should then disable “Store history for this tag” in the Data Type Properties | Data Type Structure and set it up in the Project | Transaction Groups instead?

That’s up to you - if you don’t want the historian to store values (and it sounds like you’re trying to do everything on-demand) then you should go ahead and disable that so you’re not causing unnecessary DB load.

I’d be happy enough with the tag historian if I though all the values were being saved every time the “Count” tag changed. I seem to be able to use Historian Scanclass on schedule (which saves too many records) or OnChange (which only saves the values that changed).

Is it possible to create a transaction group for a UDT?