Duplicate row in Transaction group

Hope you all enjoyed the holidays!
I’ll try to put bunch of screen shots to help you understanding my issue, so I put some tags in a regular transaction group and I set it to evaluate based on Part number so every time a that tag changes I want the transaction group to grab those tag value, oh and I’ve made a scan group based on that part number tag so every time that part changes those other tags get scanned and then stored in the DB. Every now and then connection with PLC get lost, now what happens is i get repeated entries in the DB.
I guess I’m trying to figure out if there is a way to avoid that repeat entry to the DB. Any ideas or suggestions would be appreciated.
Even if I lost connection to the PLC for a moment shouldn’t the transaction group doesn’t do anything since the value of my part tag hasn’t changed?
Doesn’t the loss of connection somehow triggers something and makes the transaction group think it needs to execute again?
Do you think its better to use the “only evaluate when values have changed” option in the Trigger section of the Transaction group or should I used the “Execute this group on a trigger” and set the trigger item to the part number tag and set it on “Active on value change”? Thanks in advance.
If you need any more information to clear something up let me know. :thumb_right:

I’d choose option ‘B’ for triggering your group. I seem to have better luck with triggering on value change.

So then both options technically do the same thing but option B has more bells and whistles?

They do pretty much the same thing. Did you happen to see the video on it?


Yes, a few times actually. Right now I have set it up so I have the same table from two different transaction groups, one with option A and one with option B just to see how each behaves. only other difference is the set of tags that are using option A (Only evaluate on change) get scanned every time the part tag changes(made a separate scan class based on the part change), but the other group is set on default scan so all get scanned every second.
using “only execute on trigger” definitely solved my repeating issue, I just still get some cells repeated every now and then and I want to see if I can fix that.

We use Boolean Logged bits in the PLC for our transaction groups.
Then the transaction group sets the bit to True after it logs the value.

When a new record is made in the PLC, the boolean is created as False, this then triggers the transaction group.

Unfortunately I don’t have much hand in the PLC side programming that’s why I’m trying to deal with issue on my side as much as possible.
most the problems are solved, down to one issue, as you see bellow, when part 86 shows up it takes a second for the other 3 rows to be populated. I was thinking about this, how about setting up a trigger based on when the part changes and when the part changes there is a few second pause and then the trigger happens therefore every column is populated and when the transaction group picks up the row it has all the updated values. I really think that should fix the issue.
As far as making the trigger I shouldn’t have a problem, how should I go about saying ok, when part changes wait 3 seconds then trigger?

time.sleep(3)  ???

Or is it better to do some Expression coding?

Wait, what if I change the transaction execution time to something more than 1 sec, shouldn’t that technically do the same as above?

Still might be a bit early to judge but so far looks like the following steps working:
Changed the scan time of the tags to 2 seconds from 1 sec default and changed the transaction group execution time to 3 seconds from 1 seconds. I’ll keep tracking it and see if any duplicate values happen again. If you all have other suggestions on ignition side I welcome them. Thanks :thumb_right:

Well I still get an occasional repeat value in some cells and I suppose looking at the whole picture the margin of error is very low, something like 3%.
I still would like to try the delayed trigger idea I had earlier, if anyone can point me to the right direction as far as how to delay a trigger based on Tag change so Basically tag value changes but I like to wait a few seconds and then trigger a Boolean tag so I can use it with my transaction group. Thank You!

You could always do a Tag Change script that counts 3 seconds and then sets the Boolean Trigger tag to true.

Tag Change Scripts:
Tag Change scripts are available in both Gateway and Client scopes. Each tag change script can be given a list of tag paths. Whenever one of these tags changes, the tag change script will execute. They will also get an initial execution whenever the scripting system starts up.[/size]

two questions,
1- Does this need to be done both on client and gateway size?
2- if any of the two(client/gateway) get restarted, does that mean my scrips gets executed? I feel like that will mess with the data?

I would do it on the Gateway, this way the data is still logged even if no clients are running.
If it is a Tag Change script looking at a tags value, even on a restart it won’t run until the Tags value changes.

Well, finally decided to ask for a change on the PLC side, now every time a new part comes in a 5 second count happens and then a bit gets send to me and stays on for 3 seconds and I use that as trigger for my transaction group. I think that should fix the issue.