:INSTrument:CARGument

Flex Apps:
FlexOTO
FlexOTO Instance:
Hardware Diagram

Command Syntax

:INSTrument{1:8}:CARGument{1:8} <argument string>

Where {1:8} specifies one of eight Instrument blocks that can be created on the User Instruments palette.

Where <argument string> is a list of arguments.

Description

Enters an optional command-line arguments for an instrument. For example, you could pass the instrument's COM port or VISA address to the driver so that the driver can open a connection to the instrument. FlexOTO passes this string to the instrument driver when the :INSTrument:RDRiver command is sent.

If your Instrument connects with over a COM port, here is one way to locate which COM port is used:

  1. In Windows Search bar, enter "Device Manager".
  2. In the Device Manager dialog, scroll down to the Ports (COM & LPT) entry.
  3. All COM ports in use are listed.
  4. Disconnect the instrument's cable to locate the COM port assigned to your instrument.

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\driver-power_meter.py"')
hwdiagram.write(':INSTrument3:CARGument "COM4"')
hwdiagram.write(':INSTrument3:RDRiver')
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