Example Code

How to use the IMAQ "Get Last Event" property

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Vision Development Module
  • LabVIEW

Code and Documents

Attachment

Overview

The example demonstrates how to check for an event on a IMAQ type control.

 

Description

Since the Vision Development Module does not feature native events in LabVIEW event structures like the Value Change event that can detect when a button has been pressed, the example uses a Mouse Up event of the IMAQ Image Display control instead. To trigger any manual event on a IMAQ control that requires at least a mouse click. After that click has been detected with the Mouse Up event an invoke node of the IMAQ Image Display control with the function Get Last Event is called to return the last event with that particular IMAQ control.

 

Requirements

 Software

  • LabVIEW 2012 Base Development System (or compatible)
  • Vision Development Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Open the attached file
  2. Run the VI
  3. Trigger an event in the IMAQ Image Display control, e.g. select a new region of interest (ROI), zoom, click, ...
  4. Check the discovered event below the IMAQ Image Display control

 

Additional Information or References

IMAQ Get Last Event - Front Panel.png

 

IMAQ Get Last Event - Block Diagram.png

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**

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