Kenny,
Thanks for the template. I have some experience with state machines and producer consumer loops (both data and event driven), so your design makes sense to me.
My big struggle with this is in the controlling of the actuall acquisition timing. I need to be able to collect and log low speed data (1 Hz sampling rate using compact fieldpoint with 5 modules (2 AI, 1 TC, 1 CT, 1 DIO) throughout the test, but use only the data collected during the Set Point Duration to perform the limit testing.
I would also need to collect and log high speed data (5 channels around 24kHz sampling rate) during the set point duration and perform some limit bounds checking after running the HS data through RMS and FFT functions.
How would I coordinate that type of timing based on the state machine model? Would I have separate Prod. / Cons. loops handling the LS and HS DAQ over the course of the entire test and use the given state machine model to try and identify the sections of the collected data to run the limit tests against as the data accumulates? (this is actually the approach that I got from one of the NI guys, but I haven't been able to implement it 🙂
Thanks again for all the help.