LabVIEW-DCAF / TDMSModule

A background datalogger for TDMS files
https://decibel.ni.com/content/projects/reference-designs-for-distributed-control-systems
Apache License 2.0
6 stars 3 forks source link

Add pretrigger samples #23

Open pollockm opened 7 years ago

pollockm commented 7 years ago

To enable a postmortem analysis, add pretrigger samples for the log. Currently we only start collecting data to log once we see the enable line go high - why not add a circular buffer in front of that?

pollockm commented 7 years ago

I'd likely have the pretrigger buffer size forced to be a multiple of the 'scans per write' property that we already use, since that is already the chunk size of the FIFO.

pollockm commented 7 years ago

Also need some form of option for trigger arming - if trigger value goes high before the pretrigger buffer is full, do we ignore until buffer full or immediately start dumping data to disk? I prefer the 'ignore until buffer full' behavior, but we might need to expose that option

smithed commented 7 years ago

If the trigger is a failure condition then you'd want pre-trigger samples even if the buffer isn't full, as some data is better than none. Unless the trigger was latched, in which case I think it would be fine to fill the buffer and then flush.