Switch to desktop version  
How to use Tag value change listener - Printable Version

+- Ewon Technical Forum (https://techforum.ewon.biz)
+-- Forum: Development (https://techforum.ewon.biz/forum-50.html)
+--- Forum: Java (https://techforum.ewon.biz/forum-53.html)
+--- Thread: How to use Tag value change listener (/thread-801.html)



How to use Tag value change listener - timon - 27-12-2018

Hi everyone

I have tested Tag value change listener on page 16 of the eWON Java interface user guide(ETK1.3).
But i used ETK 1.4.
The test results are same before and after value.
Please refer to the attached file.

What is the problem?


Regard


RE: How to use Tag value change listener - simon - 02-01-2019

Timon,

This is actually normal.  The JAVA doc states :

The current value of the Tag may already have changed by the time your event
listener is called, but the value that triggered the change event is saved and the
EvtTagValueListener has specific functions to retrieve that value (and even the value
type, as it can also change).

So both functions will return different values if the value changes again during the time between the value changes the first time and when the event is fired.
Indeed, the Tag event is not an atomic event which is triggered the millisecond just after the value changes.  There can be a delay of hundred of milliseconds depending on what the eWON is doing...

Simon