:SWITch:CARGument

Flex Apps:
FlexOTO
FlexOTO Instance:
Hardware Diagram

Command Syntax

:SWITch:CARGument "<argument string>"

Where <argument string> is a list of arguments.

Description

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

If your switch 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 switch's cable to locate the COM port assigned to your switch.

Example

hwdiagram.write(':SWITch:DMEThod UDRiver')
hwdiagram.write(':SWITch:UDPath "C:\\Python\\FlexOTO\my_switch_driver.py"')
hwdiagram.write(':SWITch:CARGument "COM4"')
hwdiagram.write(':SWITch:RDRiver')
hwdiagram.write(':CONFigure:SWITch:ACTive "My Switch-2", ON'  # place on hardware diagram
hwdiagram.write(':CONFigure:PORT:CONNect "My Switch-2", "6", "N1092B-US920000003", "A"'  # connect switch port