Example Code

Retrieve All Trigger Instances from Waveform

Code and Documents

Attachment

Overview

Demonstrate the method to detect the first level-crossing location in a waveform.

 

Description

This VI demonstrates retrieving all trigger instances from a waveform. The inputs are a path to a waveform file (.lvm) and configuration for the Basic Level Trigger Detection VI. The output is an array of trigger indexes in the waveform. Attached are the VI and a sample waveform file (.lvm). This VI can be easily extended to:

  1. analyze an acquired IO signal (such as from DAQmx Read)
  2. determine trigger times (using waveform components t0 and dt)
  3. analyze multiple signals (using the waveforms output of Read Waveforms from File

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Download the attached folder to your computer
  2. Open the VI " Retrieve All Trigger Instances from Waveform 2012 NIVerified.vi".
  3. Run the VI. 
  4. Select the Example Wave form (Example Wave form.lvm).

 

Additional Information or References
VI Snippet

Block Diagram.PNG

 

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

 

Software Engineer
National Instruments

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

Comments
sdgsdg
Member
Member
on

I love it!