I define a tag expression with now(0) as expression.
The problem is the value of tag in update in every second with current time. When I set now(0) it should mean it only run only once. why my tag value update every second?
Even i try to use change scan class to 10 s but it always updated every second.
I can’t imagine it would be useful as a gateway tag. Did you try it as a client tag?
I believe the poll rate of the
now() expression tag only is meaningful within Vision scripts (not tags, in tags it follows the execution mode or scan class). EDIT: Also possibly Client Tags, @JordanCClark might be right on that.
I just tested this behavior under 8.0.2 with a tag configured with execution mode of “Tag Group” (so that it respects the configured Tag Group/Scan Class).
It was updating once per second as expected with the Default scan class. However, changing the scan class from Default to Slow (a Direct scan class I created with 10000ms rate) did not result in a change in update times. Only when I copied, deleted, and re-pasted the tag did it start to update at the expected 10000ms rate. This might be an issue in 8.0.2.
I also tested this under 7.9.12 with a similar tag configuration and changing the scan class and applying the changes to the tag had the expected results (tag updated per the configured scan class).
It sounds like the tags scan class/tag group is overriding the now(0) .
There is similar behavior when using runScript() in tags.
I would look into using a different scan class/tag group for that tag(s) to suit your needs.
The scanclass triggler the now() if I use tag in gateway. Even with now(10000). Hope IA fix this bug.
Not a bug. Documented behavior. Same for runScript in a tag expression. There’s new functionality (that I haven’t used yet) in v8 that addresses this.
What would the use case be for using now(0) in the gateway?
I just try to create a timer event in tag change event with now(1000) for every second but it didn’t work so try now(0) to see if scan class really trigger the tag change event.