Example Code

IMAQ: Trigger Frequency Tester

Code and Documents

Attachment

Download All

Overview

This VI determines the frequency of a trigger to an NI framegrabber. 

Description

This example measures the duration of time between acquired frames using the tick count millisecond timer.  After finding the time between frames the value is then converted to Hz.

Steps to Implement or Execute Code

  1. Select IMAQ Interface Name (Ex: 'img0')
  2. Select Framegrabber Trigger Line (Ex: 'External trigger 0')
  3. Run the code.
  4. Start the respective trigger signal.
  5. Read the frequency off the 'Hz' indicator on the front panel.

   Caveats and Additional Notes:

   1.  This VI will need to be aborted if there is no trigger to be read because it will never leave the inner loop.

   2.  This VI is dependent on software timing, so accuracy is best at slow triggering rates.


Requirements

Software

LabVIEW 8.0 or Later, Vision Acquisition Software

Hardware

NI Framegrabber with external trigger lines, Camera compatible with Framegrabber,  Trigger source such as a DAQ device.

VI Snippet

IMAQ Trigger Frequency Block Diagram.png

**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

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

Contributors