Hi all,
I’m using Ignition 8.1.48 with the Vision, Tag Historian and SQL Brigde modules, and I need help setting up historical logging for a tag only when a certain condition is true — for example, when a tag is 1..
Here’s what I need to do:
- Start logging a tag value only while a condition is true.
- Stop logging when the condition goes false.
- Plot the logged values later in an Easy Chart.
- Make sure the data is stored in the database, not just in memory.
I don’t want the tag to be logged continuously. I only want to store values while something is happening, like when a tag is ON, and stop when that tag is OFF.
What’s the best way to approach this in Vision?
Things I’ve considered:
- Enabling/disabling the historian dynamically (not sure if that’s possible in Vision).
- Using a memory tag with history enabled and writing to it conditionally.
- Using
system.tag.storeTagHistory()
to manually push values into the historian.
Any examples or recommendations would be much appreciated!
Thanks!