How Can I Programmatically Open Multiple VISA Reference?

Updated Dec 17, 2018

Reported In

Software

  • LabVIEW

Driver

  • NI-VISA

Issue Details

I need to programmatically open multiple instances of the VISA driver (because I have more than one VISA resource), how can I smartly do it in LabVIEW?
 

Solution

If the resource are named just by indexing the COM port (COM1, COM2, COM3, ..., COMN) you can open more reference with a for loop as shown in the following image: 
The output is an array of VISA driver references, of course you can use this code only if the resources are properly named with the form of "COM" concatenated with the index number.

WAS THIS ARTICLE HELPFUL?

Not Helpful