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

Determine the Current VISA Version Programmatically

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

  • Other

    Software

  • LabVIEW

    Driver

  • NI VISA

Code and Documents

Attachment

Overview
This program may be used to programmatically determine the VISA Version on your current system.


Description
The VISA Version is stored in the Windows Registry.  This program accesses that particular registry key to programmatically determine the VISA Version. This program follows the typical "open, operate, close, handle errors" algorithm. First, the program opens the registry key in which the VISA Version is stored. Then the VI read the VISA Version, and close the registry key at last step.

 
Requirements

  1. LabVIEW 2012 (or compatible)
  2. NI-VISA


Steps to Implement or Execute Code

  1. Start LabVIEW as an administrator
  2. Run the Determine the Current VISA Version Programmatically 2012 NIVerified.vi

 

Additional Information or References
VI Snippet

Determine the Current VISA Version Programmatically 2012 NIVerified.png

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

Sarah S.
Applications Engineering
National Instruments

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

Comments
Todd S.
NI Employee (retired)
on

Thanks for posting.  Could you please embed a screenshot so we know what the code looks like?  Also, please rename your attachment to include the version number ("_lvXX.vi" would work).

Todd S.
LabVIEW Community Manager
National Instruments
ChristerL
Member
Member
on

Great example.  A good approach for determining any SW, and its version, installed on a local machine.