Example Code

Plotting Analog and Digital Waveforms on the Same Plane

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 graphs the analog and digital waveforms on the same plane.


Description: Since Digital and Analog waveforms are represented in LabVIEW with different data types, it can be difficult to view them on the same graph on the front panel of a VI.  The Mixed Signal Graph helps out with plotting the waveforms on the same indicator, but still uses separate graphing planes for analog and digital waveform data types. It may be more useful to view the analog and digital waveforms on the same graphing plane.  For situations like this, the attached Convert Digital Wfm to Analog Wfm.vi will take in a digital waveform and convert the first line into an analog waveform data type.  The attached Graph Dig&Anlg Wfms on Same Graph.vi uses Convert Digital Wfm to Analog Wfm.vi as a SubVI to graph the analog and digital waveforms on the same plane.


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


Steps to Implement or Execute Code:

1. Run the VI.
2. Observe that both the analog and digital waveforms appear on the same waveform graph together.


Additional Information or References: 

 

Plotting Analog and Digital Waveforms on the Same Plane FP.png

 

Plotting Analog and Digital Waveforms on the Same Plane sn.png


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

Chris_G
Sr Test Engineer
Medtronic, Inc.

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