Example Code

Using Queues to Capture Data after Trigger

Code and Documents

Attachment

Overview
This example VI Using Queues to Capture Data after Trigger.


Description

This is a small example of how you can use any trigger (a button in this case) to initiate the capture of an incoming signal for a defined period of time. The front panel show on its left the continuously captured input (simulated sine wave in this case). At the bottom you can see the trigger button and a numeric control to set how long you want to capture after a trigger. Lastly the triggered display shows the data that has been captured as a result of a trigger occuring. The block diagram shows how the queue is set up, used in a producer consumer architecture and then released when the program is stopped. See documentation in code for an explanation of how the queue is used.

This example could easily be modified to have a real input signal with associated trigger. The data captured after the trigger could then be viewed as it is in the example or it could be analyzed, saved to a file...


Requirements

  • LabVIEW 2012(or compatible)


Steps to Implement or Execute Code

  1. Download the attached file to your computer
  2. Open the VI " Using Queues to Capture Data after Trigger 2012 NIVerified.vi"
  3. Run the program

 

Additional Information or References

VI Snippet

Using Queues to Capture Data after Trigger 2012 NIVerified.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Jack. W
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.