Example Code

Acquire Data on Mouse Event Using LabVIEW SignalExpress

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

  • LabVIEW

Code and Documents

Attachment

Overview

This example shows you how to use LabVIEW SignalExpress to execute code based on a user event (e.g. mouse event).

 Description
 This example uses a simple LabVIEW VI to capture a mouse-click, and calls that VI from a LabVIEW SignalExpress project.In many data logging applications, it is nice to be able to have data acquired and logged based on user input. LabVIEW SignalExpress provides configureable logging conditions based on hardware triggers, software triggers, and date/time, but does not include a built-in way to acquire based on user input.

 

Requirements

  • LabVIEW 2012 (or compatible)
  • Signal Express 3.0 (or compatible)


Steps to Implement or Execute Code

  1. Open Mouse Event Project.lvproj to inspect the LabVIEW code used to capture the mouse event.
  2. Open Acquire Input on User Mouse Click_LVSE.seproj in LabVIEW SignalExpress
  3. Run the LabVIEW SignalExpress project. As saved, simulated Gaussian white noise will display on the waveform graph and a LED will turn on when the user presses or holds the left mouse buton.

 

Additional Information or References
VI Block Diagram

 

 1.png

 

 

 

 

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

 

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