Gets the last value

In the development of the SDK module, can I directly obtain the last value and time of the tag without queryhistory? For example, if the tag changes from 0 to 10, can I obtain the value 0 and time before 10 in the code

you can subscribe for tag change and keep in your module the previous value and timestamp


1 Like

i see

When I change value, why does it execute many times (3 times)

    public void tagChanged(TagChangeEvent tagChangeEvent) throws InvalidListenerException {
                    double random = Math.random();