Transaction group with integer value as trigger?

Now, I don’t know anymore, if I’m crazy or my feet stinks… :slight_smile:

I have the latest (7.6.5-rc1 (b2013122712) | 32-bit) Ignition.
I want to monitor an integer value in PLC, how many times that value has changed. I’ve created new standard transaction group. I put the SQLTag in the group items and set it as Event meter, bi-directional DB wins, database filed and field name as Target name. (see pictures)
Group properties are Execution scheduling as Timer - 250ms, table action is update/select last. Group trigger is Execute this group on a trigger, Trigger on item is set to MW0 (item name) and trigger conditions is Active on value change.

And… the group never execute.
The integer value in PLC is changing every 1.5-2seconds. The scan class for the SQLTag in SQLTags browser is set to default (1sec). The group is set to execute every 250ms.

What I’m doing wrong?

I was trying to do the same thing just this Monday, and could never get it to trigger. I’m thinking that either the Active on value change doesn’t work, or it means something other than what you and I think it does. I ended up using a gateway tag change script to do what I needed, but I am interested in seeing what others have to say about this, as I would rather use a transaction group.

Hi, i’m not sure what you’re trying to to, but it will not work this way. The event meter counts events (from the docs: Event Meter - Record the number or times the Item value is non-zero).
With your settings, the event meter will not count as long as the value does not return to zero.

If you want to count the changes you can set the OPC item to read-only and use an event meter expression item with:

hasChanged([~]s7_300/MW0)

Do not use a trigger with this setup, as the expression needs to see the ‘non changing’ executions to work.

Hope this helps,
Regards

[quote=“chi”]Hi, i’m not sure what you’re trying to to, but it will not work this way. The event meter counts events (from the docs: Event Meter - Record the number or times the Item value is non-zero).
With your settings, the event meter will not count as long as the value does not return to zero.

If you want to count the changes you can set the OPC item to read-only and use an event meter expression item with:

hasChanged([~]s7_300/MW0)

Do not use a trigger with this setup, as the expression needs to see the ‘non changing’ executions to work.

Hope this helps,
Regards[/quote]

Thank you, you’re the man. :prayer:
It’s working now. I’ve created only Triggered Expression item with Value Mode Property to Value, Mode as Event Meter, Write target Type as Databse field and Target Name as my field name for counter.
On Expression/SQL tab I created Expression Type Expression with code:

hasChanged({KLS_Barnaul3/Stevec/izdelanih})

The transaction group Excecution Scheduling on Timer every 1 second. With Update/select last row.

I guess I was mislead by ‘Active on value change’. Gracias.