Example Code

Selecting to Display Multiple Plots with Different Y Scales

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
This example lets the user select which channels they want to see on the plot.

Description
Each of these channels has a different Y scale that becomes visible when that channel is selected.  Each channel also has a different color that matches the Y scale color for easy reference.
This example can be modified to include many more plots by adding channels to the DAQmx Task and adding a boolean control and color selector for each additional channel. We can also substitute the DAQmx part with other signal source.

Requirement
LabVIEW 8.6 or compatible
NI-DAQmx 9.0 or compatible

Steps to Implement

  1. Configure physical channel from DAQ devices or simulated devices.
  2. Run VI.
  3. Toggle Channel Boolean Button to show plot based on the selection.

 

scfp-15345.jpg

 

Additional Information or References

VI Snippet

snippet.png

Justin D.

Applications Engineer
National Instruments

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