Example Code

Generating Steps-Incrementing Analog Signal with Digital Trigger

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.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview
The example is to demonstrate the generation of the steps-incrementing analog signal in the four levels of voltage

Description:
This VI would generate a four levels voltage signal (1 V, 2 V, 3 V and 4 V then repeat back to 1 V) using the Quotient and Reminder function with the counting edges of the counter input

Steps to Implement or Execute Code:
To implement this example:

  1. Set the Physical Channels Parameter (Analog Output and Counter Input)
  2. (Optional) Set the Edge as Rising or Falling depends on the preferences
  3. Run the VI
  4. (Optional) Turn on the Highlight Execution to see the flow of the VI

To execute this example:

  1. Install the required software.
  2. Connect the DAQ hardware that supports the AO and CI features
  3. Confirm the connection with the MAX with TestPanel
  4. Open the VI and refer the Implement Steps

 

Requirements
Software
LabVIEW 2012 or compatible
NI-DAQmx 9.0 or compatible

Hardware
cDAQ with C series Analog Output and Counter Input Module

 

fp.PNG

 

bd.PNG

 

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

Gary P.
Applications Engineer
National Instruments

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