Example Code

Get relative time of acquisition from Waveform Dynamic Data

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 how to convert a waveform's dynamic data into its respective components of time relative to the start of the acqusition and the values acquired at those points in time.


Description: A sample VI is provided with a fixed sine waveform generated with a frequency of 100 Hz and amplitude of 1 and a start time of 0. 


Requirements: LabVIEW 2012 (or compatible). Hardware: none.


Steps to Implement or Execute Code:

1) Create a Blank VI

2) Drop the "Waveform Relative Time" VI as a sub VI on the block diagram

3) Wire in a waveform from your DAQ device into the "Signal In" Input of the "Waveform Relative Time" VI.

4) Create 3 indicators for the 3 outputs of the "Waveform Relative Time" VI.

5) Run the VI to see an array of Relative Time values and an array of Y values along with a Start Time indicator.


Additional Information or References:

 

Get relative time of acquisition from Waveform Dynamic Data FP.png  

Get relative time of acquisition from Waveform Dynamic Data sn.png


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

 

 

Raj
National Instruments
Applications Engineer

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

Comments
oztaymor
Member
Member
on

Thank you!