:CONFigure:INSTrument:ACTive

Flex Apps:
FlexOTO
FlexOTO Instance:
Hardware Diagram

Command Syntax

:CONFigure:INSTrument:ACTive "<instrument-name>", {ON | OFF}

Where <instrument-name> is the name that identifies the Instrument block on the Hardware Diagram. The naming of your instrument is done in the instrument driver, and you must enter this name as this argument.

Query Syntax

:CONFigure:INSTrument:ACTive? "<instrument-name>"

Query Response

{ON | OFF}

Description

Installs or removes a measurement instrument, such as a power meter, on the Hardware Diagram. Before you can install a generic measurement instrument on the Hardware Diagram, you must write an instrument driver for your Instrument and then run your instrument driver with the :INSTrument:RDRiver command as explained in the :INSTrument subsystem. The naming of your instrument is done in the instrument driver. You cannot rename the instrument's name in FlexOTO. FlexOTO allows you to create up to eight Instrument blocks.

The name takes the form of:

"<Model Number> (Serial Number)"

The name of a instrument is important as the name is passed as an argument to other commands including the universal port connect command :CONFigure:PORT:CONNect which is used to connect instrument ports to other blocks in the Hardware Diagram. The instrument name is also shown in FlexOTO's panels and reports.

Token Parameters

The second command argument can be one of the following tokens:

ON
Installs an Instrument on the Hardware Diagram.
OFF
Uninstalls an Instrument from the Hardware Diagram.

Send the query to determine if the Instrument is installed on the Hardware Diagram. To return a list of all connected instruments in the User Instruments palette but may or may not be placed on the Hardware Diagram, sent the :CONFigure:INSTrument:ALL? query.

Example

This example shows the command that are required to connect your instrument driver, place the resulting Instrument block on the Hardware Diagram, and then connects the Instrument's measurement input port "A" to the switch's output port "IN 1".

hwdiagram.write(':INSTrument3:UDPath "C:\\Python\\FlexOTO\power_meter.py"')
hwdiagram.write(':INSTrument3:CARGument "TCPIP0::WINDOWS-1234567::hislip10::INSTR"')
hwdiagram.write(':INSTrument3:RDRiver "C:\myDrivers\mySwitchDriver.py"')
hwdiagram.write(':CONFigure:INSTrument:ACTive "Power Meter (US123456PM)"'  # place on hardware diagram
hwdiagram.write(':CONFigure:PORT:CONNect "Power Meter (US123456PM)","A","Switch (SL1:X1)","IN 1"'  # connect port A to switch port