Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage question: Tag change event #20

Open
intensite opened this issue Dec 9, 2023 · 0 comments
Open

Usage question: Tag change event #20

intensite opened this issue Dec 9, 2023 · 0 comments

Comments

@intensite
Copy link

Not an issue per say, more a usage question.

Is it feasible/possible to code an event to trap when a PLC tag value changes? Some kind of a subscription system.
I would like to publish to a MQTT topic, but only if the tag value has changed.

If no built-in feature allows for this, I was planning to implement an array of "tag objects" that would hold something like
( tagName, lastValue, currentValue ) and then regularly poll & compare the currentValue with the lastValue for each tags to be monitored.

Not the most elegant. Do you have a better solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant