Example Code

Use of Auto-indexing to Convert Array of Type Double to Type Timestamp to use for Build Waveform

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 VI This VI shows how to build an array of waveforms from input arrays of Y, dt and t0, where t0 is type double instead of a timestamp data type.

 

Description
This Example VI demonstrates how to build any array of waveforms from known corresponding arrays of Y, dt and t0,

where t0 is data type double.  It uses auto-indexing extensively to achieve this functionality. This is useful for reading in legacy data, as in LV 6.1, 6.0 or earlier, since t0 was a double instead of timestamp. The main purpose of the VI is to demonstrate the use of auto-indexing and the To Time Stamp node to build waveforms from known input waveform data where t0 is represented as double data type. Instead of reading in sample data, it is generated in the code.


Requirements

  1. LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Write datum in the Number of Waveforms control, Input Frequency control and Input Amplitude control.
  2. Run the VI

 

Additional Information or References
NI Snippet

t0 double to timestamp build waveform 2013 NIVerified.png 

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

Best Regards,

Roel F.
Applications Engineer
National Instruments

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