Archiving data on demand

Dear supporters,

we’ve been asked to support a certain archiving scenario and I do not know if ignition does it on not. Let’s imagine we have tag whose value changes very often. Normally we do not want to archive all variations. Nevertheless, let’s imagine a certain occurrence and at that occurrence we want to dump the history fro 10s before to 30s after. Basically this implied having a circular buffer that delays the archiving process and allows you to decide a posteriori what to archive and what not. Or maybe Ignition foresees this use case in a different way, is this scenario supported by the tool?

Thanks so much in advance,
Kind Regards,

There is no built-in support for such operations. It is definitely scriptable, though. Python’s deque datatype, or the various java linked list classes are ideal for such tasks.

Thank you so much for the so prompt answer. Would you please send me some extra details/documentation if existing about the Python’s deque datatype you’ve mentioned?

Thanks again,


Thank you so much, you’ve been very kind with me.
Have a nice day,

If speed matters, I’d use the this java class:

Great!, I am more a python person though :slightly_smiling_face: I feel more confortable using python

Well, Ignition doesn’t use CPython, it uses Jython. One of the key advantages of jython is that it can import and use Java classes and object as if part of Python. Since java objects are native to the JVM (and JIT to native machine code), they tend to be dramatically faster than the corresponding python library types. A few python types, like socket, are pathologically slow. Others interact poorly with Ignition’s underpinnings, like datetime.

I highly recommend learning to use java classes within jython (no need to actually learn java).

Ok, I take your point. It seems to be a matter of importing java classes without needing to have a particular knowledge of java programming, which is fair enough.
Thank you for so many good advice