The VISA Find Resources VI can be used in conjunction with a VISA Property Node and For Loop to programmatically search the available resources. To do this, follow the steps below:
- Open the functions palette and navigate to Instrument I/O»VISA»Advanced and place a VISA Find Resource VI on the block diagram to output a string array of available resources.
- Insert a For Loop and wire the output of VISA Find Resource to the left border.
- Open the functions palette and navigate to Instrument I/O»VISA»Advanced and place a VISA Open VI within the For Loop.
- Connect the VISA resource name out output of VISA Open to the reference input of a VISA Property Node.
- Left-click the property node and select Interface Information»Interface Type.
- Wire the output of the VISA Property Node Intf Type to the edge of the For Loop.
- Right-click the output on the For Loop and select Create»Indicator.
- The VI shown below searches for all available resources and displays the interface type information. Interface types and their corresponding numbers can be found in the NI-VISA Help.
: VISA Find Resource will not output resources currently in use by other applications.