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

Programmatically Create Constant Lines on DIAdem Report from LabVIEW Array

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

  • Diadem
  • LabVIEW

Code and Documents

Attachment

Overview
This example VI demonstrates how to export data from LabVIEW to DIAdem, run a .VBS script from LabVIEW and copy the result to clipboard.


Description
In LabVIEW, thanks to the LabVIEW DIAdem Connectivity VIs, you are able to programmatically launch DIAdem, import data from LabVIEW, run .VBS scripts programmatically and save the report in different formats. In this case, an array is exported from LabVIEW and the attached .VBS code is subsequently run to plot constant lines in the final report.

IMPORTANT NOTE: The LabVIEW DIAdem Connectivity VIs are not supported starting from LabVIEW 2010, as specified here.


Requirements


Steps to Implement or Execute Code

  1. Download the attached files to your computer
  2. Open the VI "Import LabVIEW Data and Analyze it in DIAdem.vi"
  3. Select the path to the .VBS file
  4. Run the program
  5. Paste the report to a program of choice

 

Additional Information or References

VI Block Diagram

 

Import LabVIEW Data and Analyze it in DIAdem.png

 

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

 

Cheers,
Kelly R.
Applications Engineer
National Instruments

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