:CONFigure:INSTrument:ALL?

Flex Apps:
FlexOTO
FlexOTO Instance:
Hardware Diagram

Query Syntax

:CONFigure:INSTrument:ALL?

Query Response

"<instrument name>","<instrument name>", ...

Description

Returns a string of all Instruments that have been recognized by FlexOTO. The string includes all DCA-M modules shown on the Detected DCA-M Modules palette and includes instruments shown on the User Instruments palette and all instruments currently placed on the Hardware Diagram. For example:

"Power Meter (US123456PM)","Tranofram (MY123456B)"

Python Example

This simple example, returns from FlexOTO the name of every valid Instrument that has been installed with an instrument driver. The output also indicates if the instrument is installed on the Hardware Diagram.

Copy
id-instruments.py
import pyvisa as visa
rm = visa.ResourceManager(r'C:\WINDOWS\system32\visa64.dll')
FlexOTO = rm.open_resource('TCPIP0::localhost::hislip0,4880::INSTR')
FlexOTO.timeout = 5000  # Set connection timeout to 5s
FlexOTO.read_termination = '\n'
FlexOTO.write_termination = '\n'
instruments = FlexOTO.query(':CONFigure:INSTrument:ALL?')
instruments = instruments.split(',')
print(str(len(instruments)) + ' Measurement Instruments Detected by FlexOTO:')
for instrument in instruments:
    if int(FlexOTO.query(':CONFigure:INSTrument:ACTive? ' + instrument)):
        print('\t' + instrument + ' is installed on Hardware Diagram.')
    else:
        print('\t' + instrument + ' connected but not installed on Hardware Diagram.')
FlexOTO.write(':SYSTem:GTLocal')
FlexOTO.close()

The output from this script would look similar to this:

2 Measurement Instruments Detected by FlexOTO:
    Power Meter (US123456PM) is installed on Hardware Diagram.
    Tranofram (MY123456B) connected but not installed on Hardware Diagram.