From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Create Multiple Scales for One Task Using LabVIEW with DAQmx

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 VI demonstrates how to create multiple scales for one task.

 
Description

By using multiple DAQmx Create Channel VIs and DAQmx Channel Property nodes, one can easily assign any Physical Channel within the task a specific scale.  This VI uses the DAQmx Create Scale VI to define the scale's parameters, but this can be replaced with a constant that maps to custom scales created in MAX. This example is useful if one needs to adjust different measurements (or generations) of a device(s) within a task by different factors.  Here, this example depicts how a linear (SCALE1) and polynomial scale (SCALE2) can be assigned to different channels in the same task.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Set up one task and two channels in VI block diagram.
  2. Run the VI, the linear scale and polynominal scale will be assigned to the two channels respectively.

 

Additional Information or References
VI Snippet

007.png

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

Regards,

Sara Lewandroski
Applications Engineer | National Instruments

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