Fast scans

I have a TCP device that I’m monitoring with a tag change script. The device may transmit the same exact string twice in a row and I need to be able to detect both of them so that the script can log them as being individual inputs.
I had tried to do this by writing a 0 to the tag at the end of the script, however, it seems that I can’t write to the tag(OPC tag) and I can’t think of another way to make the script notice the new input as being unique.
Any ideas?

There was a topic somewhere covering this…

Aha! Starting at this post, it talks about a “LastChange” tag you’d have to enable. It’s supposed to change, even if the data itself stays the same.

I am sending the same strings back to back with a 1 second delay.
After 2 identical strings, I am changing the string.
LastChange only changes every 2 seconds, clearly missing the second transmit.
I decided to try to add a new memory tag with a very fast scan class to the tag change list.

At the end of the script I simply increment this value by 1.
The tag is clearly incrementing but not nearly as fast as it should be.
I am also only able to log one of the strings per pair and it seems like the script is only running once per pair as well from these results.

How quickly is your data coming in? The last receive time tag should be updated every time the driver sets the value of the tag regardless of whether or not the new value differs from the old value. It looks like the last receive time only display down to the second so if you’re getting multiple values a second you likely won’t see a change. Are you receiving multiple values a second?

I will need to track new values down to 50 ms.
I formatted the LastChange tag and I see it displaying milliseconds.

I’ve begun working on this issue and am having a problem seeing a solution. I can’t get ignition to acknowledge the fact that a new value has arrived though an Ethernet Device if the data being transmitted is identical. Ignition is unaware that new data has arrived. I’ve looked at the Device settings, the Last Change time…etc. I’m stumped. We are feeding a message every 3 seconds. Repeated once so we would transmit to Ignition:
DATA500
DATA500
DATA501
DATA501
DATA502
.
etc
Any light you could shed on this subject would be apprectiated.
We are monitoring the tag in a GATEWAY TAG CHANGE SCRIPT using a SCANCLASS at 500ms for the tag.

Solved it. I had to delete the old devices and re create them.

I’m unable to reproduce this here. I set up a tag changed script on the last received tag that merely executes a print statement. These print statements print to the wrapper.log with a time stamp. The tag change script for the tcp driver tags will fire no quicker than the scan class rate for the tags it’s watching.

I set my scan class to 500ms and wrote the message “hello” to my tcp device connection continuously for 5 seconds with a 100ms gap between each message through a python script I wrote. When I checked my wrapper logs I saw that my print statement from my tag change script appeared twice each second. When I upped my scan class rate to 250ms I saw 4 messages a second. The message was always the same and I always saw the tag change script execute.

What version of Ignition are you running?