Transaction trigger getting stuck

I have a transaction group setup for each major piece of equipment that is logging the mode and state of each machine with timestamps. Data is used to build production reports, timelines, oee, etc.

Most of the time the system works great. Each Transaction Group has a memory tag unique trigger. It logs to the database and clears itself. When the state changes I have a script that calculates the time difference from the last state change and energizes the transaction trigger.

Unfortunately, every few days the transaction trigger gets stuck on. The transaction will not run because I have the ‘only execute once’ option. There is nothing else in the system to clear the trigger.

I’ve tried a bunch of different configurations, writing handshakes, changing action timings without any progress. I feel there is something that I’m just not understanding and looking for ideas.

I’ve considered setting up another script to clear the transaction trigger if its on too long but I’m concerned about losing data. I’ve also considered turning off the ‘only execute once’ option but dealing with duplicate database entries in the reports will require a bit of work and feels like treating the symptom rather than cause.

Screenshot of typical transaction group

Currently my execution schedule is setup for a timer every 10 seconds.

consider using an incrementing integer to trigger the group.


Implemented this and I seem to be making some progress. I found my trigger was actually occurring twice (the trigger index would count up by 2). Resolved that by changing the trigger function tag to be on a 10 second evaluation rather than event based.

The trigger integer is incrementing each time the transaction takes place. However, after the database write and a reset the trigger goes to 1 and not zero like I would expect. When setting the trigger condition to be > 0 the system gets stuck.

I decided to try implementing without the the ‘reset trigger after execution’ and use the trigger condition to ‘active on value change’. System seems to be working again.

I’m still unclear why the system is behaving this way.

I tried turning off the ‘only execute once’ and get a database entry every 10 seconds.

Edit: Thank you for your help.

I was thinking more on incrementing the trigger, use ‘trigger on value change’, (EDIT: just saw you’re doing that :wink: ) and not doing anything to it for the handshake. If a handshake is necessary, write the trigger value back to the PLC in another register.

1 Like