:SWITch:DMEThod
Flex Apps:
FlexOTO
FlexOTO Instance:
Hardware Diagram
Command Syntax
:SWITch:DMEThod {SUPPorted | UDRiver}
Description
Selects method used by FlexOTO to connect to an optical switch: automatic detection or installing a user switch driver. The command's arguments are:
- SUPPorted
- FlexOTO will automatically scan for a supported optical switch. You can force FlexOTO to initiate a switch scan with the
:SWITch:SCANcommand, which is equivalent to clicking Refresh in the Switch Connection Setup dialog. To confirm that a switch is connected, use the:SWITch:CONNected?query. - UDRiver
- FlexOTO will use a user switch driver. To import, configure, and run the switch driver, send the
:SWITch:UDPath,:SWITch:CARGument, and:SWITch:RDRivercommands. The switch driver must be an executable program (.exe) or python script (.py). To confirm that a switch is connected, use the:SWITch:CONNected?query.
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