This example demonstrates how to Write a section of a continuous grab to AVI while continuing to grab after the recording stops using IMAQdx and an Event Structure.
This VI uses a parallel loop structure to implement a producer/consumer architecture. The top loop is performing the IMAQdx Grab and producing new frames every iteration. The bottom loop is the consumer and a state machine with an event structure waiting for the "Record" boolean value to change. This event structure waits on Record Event to transistion to transition to AVI write state, otherwise it sleeps to wait on event or transitions to stop state when stop boolean is pressed. When "Record" is set to true an AVI File Reference is created at specified file path. Nothing happens when the event structure times out and when the Stop button is pressed on the front panel both loops terminate.
Steps to Implement
1. Specify AVI File Path
2. Select the Camera Interface.
3. Run the VI
4. Set Record booelean to true during segment of Grab you wish to record to AVI
5. Set Recor boolean to false to end recording.
6. Click Stop to terminate program.
LabVIEW 2009 and Later, Vision Acquisition Software, Vision Development Module
NI-IMAQdx Compatible Camera (i.e FireWire, GigE, USB)