Logic Analyzer · SCPI command reference

Keysight 1670G, 1671G, 1672G, and 1673G SCPI commands

The Keysight 1670G, 1671G, 1672G, and 1673G logic analyzer is controlled remotely with SCPI commands. TestFlow's instrument library holds 248 commands for it, 72 of them queries that read values or state, grouped below by subsystem with their arguments. It is the same library TestFlow's AI agent uses to drive the 1670G on a real bench.

Commands
248
Queries
72
Subsystems
31
Models covered
4

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Keysight 1670G, 1671G, 1672G, or 1673G and writes the report from the measured results.

Get started

Control the Keysight 1670G from Python

With PyVISA, any VISA backend, and the instrument on USB, LAN or GPIB, this opens a session, identifies the instrument, sends one setting, and reads one value. Every command in it comes from the reference below. For a full walkthrough, see the PyVISA tutorial and the SCPI command cheat sheet.

import pyvisa

rm = pyvisa.ResourceManager()
print(rm.list_resources())  # find the Keysight 1670G's VISA address

# Paste the address of your Keysight 1670G (USB, LAN or GPIB).
inst = rm.open_resource("PASTE_VISA_ADDRESS_HERE")
inst.timeout = 5000  # ms

print(inst.query("*IDN?"))  # identify the instrument
inst.write(":MMEMory:AUToload OFF")  # Autoload Off
print(inst.query(":MEASure:SOURce CHANnel1;FREQuency?"))  # Measure Scope Frequency

inst.close()

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Keysight 1670G, 1671G, 1672G, or 1673G and writes the report from the measured results.

Get started

Run a 1670G test without writing code

Describe the test in a sentence, for example “autoload off on the 1670G, then measure scope frequency and log it against a limit”. TestFlow's agent builds the steps from this command library, runs them on your bench through the TestFlow desktop app, and writes the report from the measured values. See AI test automation for lab instruments for how that works and where it stops.

Get started

SCPI command reference

248 commands in 31 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values. The 1670G, 1671G, 1672G, and 1673G share this command set in TestFlow's library.

MACH subsystem (131)

CommandWhat it doesArguments
:MACHine<Machine>:TYPE <Type>Set Machine Type. Sets the analyzer type of machine 1 or 2 (only one timing analyzer allowed).Number: 1,2; Text: OFF,STATe,TIMing,COMPare,SPA
:MACHine<Machine>:TYPE?Read Machine Type. Returns the analyzer type of the specified machine.Number: 1,2
:MACHine<Machine>:ASSign <Pod_List>Assign Pods. Assigns pods (in pairs) to the machine, e.g. 1,2 or NONE; pod 1-8 on 1670G, 1-6 on 1671G, 1-4 on 1672G, 1-2 on 1673G.Number: 1,2; Text
:MACHine<Machine>:ASSign?Read Pod Assignment. Returns the pods assigned to the specified machine.Number: 1,2
:MACHine<Machine>:NAME '<Name>'Set Machine Name. Assigns a name of up to 10 characters to the machine.Number: 1,2; Text
:MACHine<Machine>:NAME?Read Machine Name. Returns the name of the specified machine.Number: 1,2
:MACHine<Machine>:ARM <Source>Set Machine Arm. Sets the arming source of the machine (RUN disables arming by other sources).Number: 1,2; Text: RUN,INTermodule,MACHine1,MACHine2
:MACHine<Machine>:RESource <Resource_List>Assign Resources. Assigns resource terms (A-G and I, RANGe1/2, TIMer1/2, H/J state only) to the machine, e.g. A,B,RANGe1.Number: 1,2; Text
:MACHine1:SFORmat:LABel '<Label>',<Polarity>,<Pod_Bits>Set State Label M1. Creates or modifies a machine 1 state label: polarity and comma-separated clock/pod bit masks highest pod first (e.g. 0,127,40312).Text; Text: POSitive,NEGative; Text
:MACHine2:SFORmat:LABel '<Label>',<Polarity>,<Pod_Bits>Set State Label M2. Creates or modifies a machine 2 state label: polarity and comma-separated clock/pod bit masks highest pod first.Text; Text: POSitive,NEGative; Text
:MACHine<Machine>:SFORmat:LABel? '<Label>'Read State Label. Returns the polarity and channel assignments of a state label.Number: 1,2; Text
:MACHine<Machine>:SFORmat:REMove '<Label>'Remove State Label. Deletes one state format label.Number: 1,2; Text
:MACHine<Machine>:SFORmat:REMove ALLRemove All State Labels. Deletes all state format labels of the machine.Number: 1,2
:MACHine<Machine>:SFORmat:CLOCk<Pod> <Mode>Set State Clock Mode. Sets the clocking mode of a pod (pod 1-8 on 1670G, 1-6 on 1671G, 1-4 on 1672G, 1-2 on 1673G).Number: 1,2; Number: 1,2,3,4,5,6,7,8; Text: MASTer,SLAVe,DEMultiplex
:MACHine<Machine>:SFORmat:MASTer <Clock>,<Edge>Set State Master Clock. Sets the master clock edge specification for clock J/K/L/M (edges are ORed).Number: 1,2; Text: J,K,L,M; Text: OFF,RISing,FALLing,BOTH
:MACHine<Machine>:SFORmat:SETHold <Pod>,<Value>Set State Setup Hold. Sets the setup/hold index 0-9 for a pod (e.g. 0=3.5/0.0 ns for one clock edge; pod 1-8 on 1670G, 1-6 on 1671G, 1-4 on 1672G, 1-2 on 1673G).Number: 1,2; Number: 1,2,3,4,5,6,7,8; Number: 0,1,2,3,4,5,6,7,8,9
:MACHine<Machine>:SFORmat:THReshold<Pod> <Preset>Set State Threshold Preset. Sets a pod threshold to TTL (+1.6 V) or ECL (-1.3 V) (pod 1-8 on 1670G, 1-6 on 1671G, 1-4 on 1672G, 1-2 on 1673G).Number: 1,2; Number: 1,2,3,4,5,6,7,8; Text: TTL,ECL
:MACHine<Machine>:SFORmat:THReshold<Pod> <Voltage>Set State Threshold Voltage. Sets a pod threshold voltage from -6.00 to +6.00 V in 0.05 V steps.Number: 1,2; Number: 1,2,3,4,5,6,7,8; Number: -6.0,6.0
:MACHine<Machine>:SFORmat:THReshold<Pod>?Read State Threshold. Returns the threshold voltage of a pod.Number: 1,2; Number: 1,2,3,4,5,6,7,8
:MACHine<Machine>:STRigger:ACQuisition <Mode>Set State Acquisition. Sets the state analyzer acquisition mode.Number: 1,2; Text: AUTOmatic,MANual
:MACHine<Machine>:STRigger:CLEar <Item>Clear State Trigger. Clears all state trigger settings, only the sequence levels or only the resource term patterns.Number: 1,2; Text: All,SEQuence,RESource
:MACHine<Machine>:STRigger:SEQuence <Levels>,<Trigger_Level>Set State Sequence. Redefines the trace sequence with 2-12 levels and the level holding the trigger.Number: 1,2; Number: 2,12; Number
:MACHine1:STRigger:TERM <Term>,'<Label>','<Pattern>'Set State Term M1. Sets machine 1 pattern recognizer term for a label, e.g. '#H0F' or '#B01XX' (X = don't care).Text: A,B,C,D,E,F,G,H,I,J; Text; Text
:MACHine2:STRigger:TERM <Term>,'<Label>','<Pattern>'Set State Term M2. Sets machine 2 pattern recognizer term for a label, e.g. '#H0F' or '#B01XX' (X = don't care).Text: A,B,C,D,E,F,G,H,I,J; Text; Text
:MACHine<Machine>:STRigger:TERM? <Term>,'<Label>'Read State Term. Returns the pattern of a term for the given label.Number: 1,2; Text: A,B,C,D,E,F,G,H,I,J; Text
:MACHine1:STRigger:FIND<Level> '<Qualifier>',<Occurrence>Set State Find M1. Sets machine 1 proceed (or trigger) qualifier for a level, e.g. 'A' or '(A OR B)', and occurrence 1-1048575.Number; Text; Number: 1,1048575
:MACHine2:STRigger:FIND<Level> '<Qualifier>',<Occurrence>Set State Find M2. Sets machine 2 proceed (or trigger) qualifier for a level and occurrence 1-1048575.Number; Text; Number: 1,1048575
:MACHine<Machine>:STRigger:STORe<Level> '<Qualifier>'Set State Store. Sets the store qualifier for a sequence level (e.g. 'ANYSTATE' or 'NOSTATE').Number: 1,2; Number; Text
:MACHine<Machine>:STRigger:MLENgth <Length>Set State Memory Length. Sets the state analyzer memory depth in states.Number: 1,2; Number: 4096,8192,16384,32768,65536,131072,262144,524288,1032192
:MACHine<Machine>:STRigger:MLENgth?Read State Memory Length. Returns the state analyzer memory depth.Number: 1,2
:MACHine<Machine>:STRigger:TAG OFFState Tag Off. Turns count tagging off.Number: 1,2
:MACHine<Machine>:STRigger:TAG TIMEState Tag Time. Turns on time tagging (required for mixed mode and X-O time measurements).Number: 1,2
:MACHine<Machine>:STRigger:TAG '<Qualifier>'State Tag States. Turns on state tagging counting states that match the qualifier.Number: 1,2; Text
:MACHine<Machine>:STRigger:TPOSition <Position>Set State Trigger Position. Sets the trigger position at the start, center or end of the trace.Number: 1,2; Text: STARt,CENTer,END
:MACHine<Machine>:STRigger:TPOSition POSTstore,<Percent>Set State Trigger Poststore. Sets the trigger position as poststore percentage 0-100 (100 = start).Number: 1,2; Number: 0,100
:MACHine<Machine>:STRigger:TPOSition?Read State Trigger Position. Returns the trigger position setting.Number: 1,2
:MACHine1:SLISt:COLumn <Column>,'<Label>',<Base>Set State List Column M1. Assigns a label and base to machine 1 listing column 1-61 (TAGS label uses ABSolute/RELative).Number: 1,61; Text; Text: BINary,HEXadecimal,OCTal,DECimal,TWOS,ASCii,SYMBol,IASSembler,ABSolute,RELative
:MACHine2:SLISt:COLumn <Column>,'<Label>',<Base>Set State List Column M2. Assigns a label and base to machine 2 listing column 1-61 (TAGS label uses ABSolute/RELative).Number: 1,61; Text; Text: BINary,HEXadecimal,OCTal,DECimal,TWOS,ASCii,SYMBol,IASSembler,ABSolute,RELative
:MACHine<Machine>:SLISt:REMoveRemove State List Labels. Removes all labels except the leftmost from the state listing.Number: 1,2
:MACHine<Machine>:SLISt:DATA? <Line>,'<Label>'Read State List Data. Returns the value of a label at a listing line number (-1032192 to +1032192) relative to the trigger.Number: 1,2; Number: -1032192,1032192; Text
:MACHine<Machine>:SLISt:LINE <Line>Set State List Line. Scrolls the state listing so the given line (relative to trigger) is at center screen.Number: 1,2; Number: -1032192,1032192
:MACHine<Machine>:SLISt:MMODe <Mode>Set State Marker Mode. Sets the state listing marker mode (TIME/STATe/MSTats need tagging on).Number: 1,2; Text: OFF,PATTern,STATe,TIME,MSTats
:MACHine<Machine>:SLISt:XPATtern '<Label>','<Pattern>'Set State X Pattern. Sets the X marker search pattern for a label.Number: 1,2; Text; Text
:MACHine<Machine>:SLISt:OPATtern '<Label>','<Pattern>'Set State O Pattern. Sets the O marker search pattern for a label.Number: 1,2; Text; Text
:MACHine<Machine>:SLISt:XSEarch <Occurrence>,<Origin>Set State X Search. Sets the X marker search occurrence relative to the trigger or start of data.Number: 1,2; Number: -1032192,1032192; Text: TRIGger,STARt
:MACHine<Machine>:SLISt:OSEarch <Occurrence>,<Origin>Set State O Search. Sets the O marker search occurrence relative to trigger, start or X marker.Number: 1,2; Number: -1032192,1032192; Text: TRIGger,STARt,XMARker
:MACHine<Machine>:SLISt:XTAG <Value>Set State X Tag. Places the X marker at a time (time tagging) or state count (state tagging).Number: 1,2; Number
:MACHine<Machine>:SLISt:OTAG <Value>Set State O Tag. Places the O marker at a time (time tagging) or state count (state tagging).Number: 1,2; Number
:MACHine<Machine>:SLISt:XTAG?Read State X Tag. Returns the X marker position in time or states (9.9E37 or 2147483647 if invalid).Number: 1,2
:MACHine<Machine>:SLISt:OTAG?Read State O Tag. Returns the O marker position in time or states (9.9E37 or 2147483647 if invalid).Number: 1,2
:MACHine<Machine>:SLISt:XSTate?Read State X State. Returns the listing line number of the X marker (2147483647 if invalid).Number: 1,2
:MACHine<Machine>:SLISt:OSTate?Read State O State. Returns the listing line number of the O marker (2147483647 if invalid).Number: 1,2
:MACHine<Machine>:SLISt:XOTime?Read State XO Time. Returns the time or number of states from the X to the O marker.Number: 1,2
:MACHine<Machine>:SLISt:TAVerage?Read State Time Average. Returns the average X-to-O time over valid runs (9.9E37 if none).Number: 1,2
:MACHine<Machine>:SLISt:TMAXimum?Read State Time Maximum. Returns the maximum X-to-O time (9.9E37 if invalid).Number: 1,2
:MACHine<Machine>:SLISt:TMINimum?Read State Time Minimum. Returns the minimum X-to-O time (9.9E37 if invalid).Number: 1,2
:MACHine<Machine>:SLISt:VRUNs?Read State Valid Runs. Returns the number of valid runs and total runs.Number: 1,2
:MACHine<Machine>:SLISt:RUNTil OFFState Run Until Off. Disables the run-until stop condition (repetitive runs until STOP).Number: 1,2
:MACHine<Machine>:SLISt:RUNTil LT,<Time>State Run Until LT. Runs repetitively until the X-O time is less than the value (s).Number: 1,2; Number: -9e9,9e9
:MACHine<Machine>:SLISt:RUNTil GT,<Time>State Run Until GT. Runs repetitively until the X-O time is greater than the value (s).Number: 1,2; Number: -9e9,9e9
:MACHine<Machine>:SWAVeform:INSert '<Label>',<Bit_ID>Insert State Waveform. Adds a label to the state waveform display: bit number 0-31, OVERlay or ALL.Number: 1,2; Text; Text
:MACHine<Machine>:SWAVeform:REMoveRemove State Waveforms. Clears the state waveform display.Number: 1,2
:MACHine<Machine>:SWAVeform:RANGe <Samples>Set State Waveform Range. Sets the number of samples across the state waveform screen (10-5000).Number: 1,2; Number: 10,5000
:MACHine<Machine>:COMPare:COPYCompare Copy Listing. Copies the acquired state listing into the compare reference image.Number: 1,2
:MACHine<Machine>:COMPare:SETCompare Set Dont Care. Sets every state of the reference listing to don't care.Number: 1,2
:MACHine<Machine>:COMPare:CMASk '<Label>','<Care_Spec>'Set Compare Mask. Sets the channel compare mask of a label with * (care) and . (don't care) characters.Number: 1,2; Text; Text
:MACHine1:COMPare:DATA '<Label>',<Line>,'<Pattern>'Set Compare Data M1. Edits machine 1 compare reference image for a label at a line (-245760 to +245760).Text; Number: -245760,245760; Text
:MACHine2:COMPare:DATA '<Label>',<Line>,'<Pattern>'Set Compare Data M2. Edits machine 2 compare reference image for a label at a line (-245760 to +245760).Text; Number: -245760,245760; Text
:MACHine<Machine>:COMPare:DATA? '<Label>',<Line>Read Compare Data. Returns the compare reference value of a label at a line.Number: 1,2; Text; Number: -245760,245760
:MACHine<Machine>:COMPare:FIND? <Occurrence>Find Compare Difference. Returns the line number of the Nth difference within the compare range.Number: 1,2; Number: 1,245760
:MACHine<Machine>:COMPare:RANGe FULLSet Compare Range Full. Compares over the full acquisition memory.Number: 1,2
:MACHine<Machine>:COMPare:RANGe PARTial,<Start_Line>,<Stop_Line>Set Compare Range Partial. Limits the comparison to a range of lines.Number: 1,2; Number: -245760,245760; Number: -245760,245760
:MACHine<Machine>:COMPare:RUNTil EQUalCompare Run Until Equal. Runs repetitively until acquired data equals the compare image.Number: 1,2
:MACHine<Machine>:COMPare:RUNTil NEQualCompare Run Until Not Equal. Runs repetitively until any channel differs from the compare image.Number: 1,2
:MACHine<Machine>:TFORmat:ACQMode <Mode>Set Timing Acq Mode. Sets timing acquisition to full-channel 125 MHz or half-channel 250 MHz.Number: 1,2; Text: FULL,HALF
:MACHine1:TFORmat:LABel '<Label>',<Polarity>,<Pod_Bits>Set Timing Label M1. Creates or modifies a machine 1 timing label: polarity and comma-separated clock/pod bit masks highest pod first.Text; Text: POSitive,NEGative; Text
:MACHine2:TFORmat:LABel '<Label>',<Polarity>,<Pod_Bits>Set Timing Label M2. Creates or modifies a machine 2 timing label: polarity and comma-separated clock/pod bit masks highest pod first.Text; Text: POSitive,NEGative; Text
:MACHine<Machine>:TFORmat:LABel? '<Label>'Read Timing Label. Returns the polarity and channel assignments of a timing label.Number: 1,2; Text
:MACHine<Machine>:TFORmat:REMove '<Label>'Remove Timing Label. Deletes one timing format label.Number: 1,2; Text
:MACHine<Machine>:TFORmat:REMove ALLRemove All Timing Labels. Deletes all timing format labels of the machine.Number: 1,2
:MACHine<Machine>:TFORmat:THReshold<Pod> <Preset>Set Timing Threshold Preset. Sets a pod threshold to TTL (+1.6 V) or ECL (-1.3 V) (pod 1-8 on 1670G, 1-6 on 1671G, 1-4 on 1672G, 1-2 on 1673G).Number: 1,2; Number: 1,2,3,4,5,6,7,8; Text: TTL,ECL
:MACHine<Machine>:TFORmat:THReshold<Pod> <Voltage>Set Timing Threshold Voltage. Sets a pod threshold voltage from -6.00 to +6.00 V in 0.05 V steps.Number: 1,2; Number: 1,2,3,4,5,6,7,8; Number: -6.0,6.0
:MACHine<Machine>:TFORmat:THReshold<Pod>?Read Timing Threshold. Returns the threshold voltage of a pod.Number: 1,2; Number: 1,2,3,4,5,6,7,8
:MACHine<Machine>:TTRigger:ACQuisition <Mode>Set Timing Acquisition. Sets the timing analyzer acquisition mode.Number: 1,2; Text: AUTOmatic,MANual
:MACHine<Machine>:TTRigger:CLEar <Item>Clear Timing Trigger. Clears all timing trigger settings, only the sequence levels or only the resource term patterns.Number: 1,2; Text: All,SEQuence,RESource
:MACHine<Machine>:TTRigger:SEQuence <Levels>Set Timing Sequence. Redefines the timing trace sequence with 1-10 levels (trigger on last level).Number: 1,2; Number: 1,10
:MACHine<Machine>:TTRigger:SPERiod <Period>Set Timing Sample Period. Sets the timing analyzer sample period from 4 ns to 100 us.Number: 1,2; Number: 4e-9,100e-6
:MACHine1:TTRigger:TERM <Term>,'<Label>','<Pattern>'Set Timing Term M1. Sets machine 1 timing pattern term for a label (X = don't care).Text: A,B,C,D,E,F,G,I; Text; Text
:MACHine2:TTRigger:TERM <Term>,'<Label>','<Pattern>'Set Timing Term M2. Sets machine 2 timing pattern term for a label (X = don't care).Text: A,B,C,D,E,F,G,I; Text; Text
:MACHine<Machine>:TTRigger:TERM? <Term>,'<Label>'Read Timing Term. Returns the pattern of a timing term for the given label.Number: 1,2; Text: A,B,C,D,E,F,G,I; Text
:MACHine1:TTRigger:EDGE<Edge> '<Label>','<Edge_Spec>'Set Timing Edge M1. Sets machine 1 edge term 1 or 2 for a label using R/F/E/. per bit (string length = label width).Number: 1,2; Text; Text
:MACHine2:TTRigger:EDGE<Edge> '<Label>','<Edge_Spec>'Set Timing Edge M2. Sets machine 2 edge term 1 or 2 for a label using R/F/E/. per bit (string length = label width).Number: 1,2; Text; Text
:MACHine1:TTRigger:FIND<Level> '<Qualifier>',OCCurrence,<Occurrence>Set Timing Find Occurrence M1. Sets machine 1 timing level qualifier to proceed after N occurrences (1-1048575).Number; Text; Number: 1,1048575
:MACHine1:TTRigger:FIND<Level> '<Qualifier>',GT,<Duration>Set Timing Find GT M1. Sets machine 1 timing level qualifier to proceed when present longer than a duration (8 ns-5 s).Number; Text; Number: 8e-9,5
:MACHine1:TTRigger:FIND<Level> '<Qualifier>',LT,<Duration>Set Timing Find LT M1. Sets machine 1 timing level qualifier to proceed when present shorter than a duration (8 ns-5 s).Number; Text; Number: 8e-9,5
:MACHine2:TTRigger:FIND<Level> '<Qualifier>',OCCurrence,<Occurrence>Set Timing Find Occurrence M2. Sets machine 2 timing level qualifier to proceed after N occurrences (1-1048575).Number; Text; Number: 1,1048575
:MACHine2:TTRigger:FIND<Level> '<Qualifier>',GT,<Duration>Set Timing Find GT M2. Sets machine 2 timing level qualifier to proceed when present longer than a duration (8 ns-5 s).Number; Text; Number: 8e-9,5
:MACHine2:TTRigger:FIND<Level> '<Qualifier>',LT,<Duration>Set Timing Find LT M2. Sets machine 2 timing level qualifier to proceed when present shorter than a duration (8 ns-5 s).Number; Text; Number: 8e-9,5
:MACHine<Machine>:TTRigger:MLENgth <Length>Set Timing Memory Length. Sets the timing analyzer memory depth in samples.Number: 1,2; Number: 4096,8192,16384,32768,65536,131072,262144,524288,1032192
:MACHine<Machine>:TTRigger:MLENgth?Read Timing Memory Length. Returns the timing analyzer memory depth.Number: 1,2
:MACHine<Machine>:TTRigger:TPOSition <Position>Set Timing Trigger Position. Sets the timing trigger at the start, center or end of the trace.Number: 1,2; Text: STARt,CENTer,END
:MACHine<Machine>:TTRigger:TPOSition POSTstore,<Percent>Set Timing Trigger Poststore. Sets the timing trigger position as poststore percentage 0-100.Number: 1,2; Number: 0,100
:MACHine<Machine>:TTRigger:TPOSition DELay,<Time>Set Timing Trigger Delay. Starts the trace a delay time after the trigger (2 x sample period to 516096 x sample period).Number: 1,2; Number
:MACHine<Machine>:TTRigger:TPOSition?Read Timing Trigger Position. Returns the timing trigger position setting.Number: 1,2
:MACHine<Machine>:TWAVeform:INSert '<Label>',<Bit_ID>Insert Timing Waveform. Adds a label to the timing waveform display: bit number 0-31, OVERlay or ALL (max 96 waveforms).Number: 1,2; Text; Text
:MACHine<Machine>:TWAVeform:REMoveRemove Timing Waveforms. Deletes all waveforms from the timing waveform display.Number: 1,2
:MACHine<Machine>:TWAVeform:RANGe <Time>Set Timing Waveform Range. Sets the full-screen time (10 x s/div) from 10 ns to 10 ks.Number: 1,2; Number: 10e-9,10e3
:MACHine<Machine>:TWAVeform:DELay <Delay>Set Timing Waveform Delay. Sets the time from trigger to screen center (-2500 s to +2500 s).Number: 1,2; Number: -2500,2500
:MACHine<Machine>:TWAVeform:MMODe <Mode>Set Timing Marker Mode. Sets the timing waveform marker mode.Number: 1,2; Text: OFF,PATTern,TIME,MSTats
:MACHine<Machine>:TWAVeform:XTIMe <Time>Set Timing X Time. Places the X marker at a time relative to trigger (TIME marker mode).Number: 1,2; Number: -10e3,10e3
:MACHine<Machine>:TWAVeform:OTIMe <Time>Set Timing O Time. Places the O marker at a time relative to trigger (TIME marker mode).Number: 1,2; Number: -2.5e3,2.5e3
:MACHine<Machine>:TWAVeform:XTIMe?Read Timing X Time. Returns the X marker time (9.9E37 if invalid).Number: 1,2
:MACHine<Machine>:TWAVeform:OTIMe?Read Timing O Time. Returns the O marker time (9.9E37 if invalid).Number: 1,2
:MACHine<Machine>:TWAVeform:XOTime?Read Timing XO Time. Returns the time from the X to the O marker (9.9E37 if invalid).Number: 1,2
:MACHine<Machine>:TWAVeform:XPATtern '<Label>','<Pattern>'Set Timing X Pattern. Sets the X marker search pattern for a label.Number: 1,2; Text; Text
:MACHine<Machine>:TWAVeform:OPATtern '<Label>','<Pattern>'Set Timing O Pattern. Sets the O marker search pattern for a label.Number: 1,2; Text; Text
:MACHine<Machine>:TWAVeform:XSEarch <Occurrence>,<Origin>Set Timing X Search. Sets the X marker pattern search occurrence relative to trigger or start.Number: 1,2; Number: -1032192,1032192; Text: TRIGger,STARt
:MACHine<Machine>:TWAVeform:OSEarch <Occurrence>,<Origin>Set Timing O Search. Sets the O marker pattern search occurrence relative to start, trigger or X marker.Number: 1,2; Number: -1032192,1032192; Text: STARt,TRIGger,XMARker
:MACHine<Machine>:TWAVeform:TAVerage?Read Timing Time Average. Returns the average X-to-O time (9.9E37 if invalid).Number: 1,2
:MACHine<Machine>:TWAVeform:TMAXimum?Read Timing Time Maximum. Returns the maximum X-to-O time (9.9E37 if invalid).Number: 1,2
:MACHine<Machine>:TWAVeform:TMINimum?Read Timing Time Minimum. Returns the minimum X-to-O time (9.9E37 if invalid).Number: 1,2
:MACHine<Machine>:TWAVeform:VRUNs?Read Timing Valid Runs. Returns the number of valid runs and total runs.Number: 1,2
:MACHine<Machine>:TWAVeform:RUNTil OFFTiming Run Until Off. Disables the timing run-until stop condition.Number: 1,2
:MACHine<Machine>:TWAVeform:RUNTil LT,<Time>Timing Run Until LT. Runs repetitively until the X-O time is less than the value (s).Number: 1,2; Number
:MACHine<Machine>:TWAVeform:RUNTil GT,<Time>Timing Run Until GT. Runs repetitively until the X-O time is greater than the value (s).Number: 1,2; Number
:MACHine<Machine>:TLISt:DATA? <Line>,'<Label>'Read Timing List Data. Returns the value of a label at a timing listing line (-1032192 to +1032192) relative to the trigger.Number: 1,2; Number: -1032192,1032192; Text
:MACHine<Machine>:TLISt:LINE <Line>Set Timing List Line. Scrolls the timing listing so the given line is at center screen.Number: 1,2; Number: -1032192,1032192
:MACHine<Machine>:SYMBol:BASE '<Label>',<Base>Set Symbol Base. Sets the base used to display symbols for a label.Number: 1,2; Text; Text: BINary,HEXadecimal,OCTal,DECimal,ASCii
:MACHine1:SYMBol:PATTern '<Label>','<Symbol>','<Pattern>'Set Symbol Pattern M1. Creates a machine 1 pattern symbol (up to 16 chars) for a label.Text; Text; Text
:MACHine2:SYMBol:PATTern '<Label>','<Symbol>','<Pattern>'Set Symbol Pattern M2. Creates a machine 2 pattern symbol (up to 16 chars) for a label.Text; Text; Text
:MACHine<Machine>:SYMBol:REMoveRemove Symbols. Deletes all symbols of the machine.Number: 1,2

Mass memory (MMEMory) (13)

CommandWhat it doesArguments
:MMEMory:AUToload '<Auto_File>',<MSUS>Set Autoload. Enables autoload of the named configuration file at the next power-on.Text; Text: INTernal0,INTernal1
:MMEMory:AUToload OFFAutoload Off. Disables the autoload feature.None
:MMEMory:CATalog? <MSUS>Read Catalog. Returns the disk directory as block data (51 characters per file).Text: INTernal0,INTernal1
:MMEMory:CD '<Directory>',<MSUS>Change Directory. Changes the working directory on the hard disk or a DOS flexible disk ('..' = parent).Text; Text: INTernal0,INTernal1
:MMEMory:PWD? <MSUS>Read Working Directory. Returns the present working directory for the specified drive.Text: INTernal0,INTernal1
:MMEMory:MSI <MSUS>Set Mass Storage. Selects the default mass storage device (INTernal0=hard disk, INTernal1=flexible disk).Text: INTernal0,INTernal1
:MMEMory:MSI?Read Mass Storage. Returns the current default mass storage device.None
:MMEMory:LOAD:CONFig '<Name>',<MSUS>Load Config. Loads a configuration file for the system, analyzer and options (LOAD ALL).Text; Text: INTernal0,INTernal1
:MMEMory:LOAD:CONFig '<Name>',<MSUS>,<Module>Load Config Module. Loads a configuration file into one module (0=system, 1=logic analyzer).Text; Text: INTernal0,INTernal1; Number: 0,1
:MMEMory:LOAD:IASSembler '<IA_Name>',<MSUS>,<Machine>Load Inverse Assembler. Loads an inverse assembler file into the specified state machine.Text; Text: INTernal0,INTernal1; Number: 1,2
:MMEMory:STORe:CONFig '<Name>','<Description>'Store Config. Stores the system and analyzer configuration to a file with a description (up to 32 characters).Text; Text
:MMEMory:STORe:CONFig '<Name>','<Description>',<Module>Store Config Module. Stores the configuration of one module (0=system, 1=logic analyzer) to a file.Text; Text; Number: 0,1
:MMEMory:PURGe '<Name>',<MSUS>Purge File. Permanently deletes a file from the disk.Text; Text: INTernal0,INTernal1

System (SYSTem) (12)

CommandWhat it doesArguments
:SYSTem:DATA?Read System Data. Returns the acquired data and configuration of the last run as IEEE 488.2 block data.None
:SYSTem:DSP '<Message>'Display Message. Writes a quoted string (up to 68 characters) to the instrument display advisory line.Text
:SYSTem:ERRor?Read Error. Returns the oldest error number from the error queue (0 = no error).None
:SYSTem:ERRor? STRingRead Error String. Returns the oldest error from the error queue as <number>,<message string>.None
:SYSTem:HEADer ONHeader On. Includes command headers in query responses.None
:SYSTem:HEADer OFFHeader Off. Omits command headers from query responses (recommended for numeric reads).None
:SYSTem:LONGform ONLongform On. Returns query headers and alpha arguments in long form.None
:SYSTem:LONGform OFFLongform Off. Returns query headers and alpha arguments in abbreviated short form.None
:SYSTem:PRINt SCReenPrint Screen. Prints the screen to the configured printer.None
:SYSTem:PRINt ALLPrint All. Prints the entire listing buffer to the configured printer.None
:SYSTem:PRINt SCReen,DISK,'<Pathname>',<MSUS>,<Format>Print Screen To Disk. Prints the screen to a disk file in BTIF (B&W TIFF), CTIF, PCX or EPS format.Text; Text: INTernal0,INTernal1; Text: BTIF,CTIF,PCX,EPS
:SYSTem:PRINt? <Source>Read Print Data. Sends the screen or listing print data to the controller (send alone on the command line; no header).Text: SCReen,ALL

Measurement (MEASure) (12)

CommandWhat it doesArguments
:MEASure:SOURce CHANnel<Channel>Set Scope Measure Source. Selects the channel for automatic measurements (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;ALL?Measure Scope All. Returns the full set of automatic measurements (period, rise, fall, frequency, widths, VPP, amplitude, preshoot, overshoot) of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;FREQuency?Measure Scope Frequency. Returns the frequency in Hz of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;PERiod?Measure Scope Period. Returns the period in seconds of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;RISetime?Measure Scope Rise Time. Returns the 10%-90% rise time in seconds of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;FALLtime?Measure Scope Fall Time. Returns the 90%-10% fall time in seconds of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;PWIDth?Measure Scope Pos Width. Returns the positive pulse width in seconds of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;NWIDth?Measure Scope Neg Width. Returns the negative pulse width in seconds of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;VPP?Measure Scope VPP. Returns the peak-to-peak voltage of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;VAMPlitude?Measure Scope VAmplitude. Returns the top-to-base amplitude voltage of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;VMAX?Measure Scope VMax. Returns the maximum voltage of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2
:MEASure:SOURce CHANnel<Channel>;VMIN?Measure Scope VMin. Returns the minimum voltage of the channel (9.9E37 if not measurable) (requires oscilloscope option).Number: 1,2

SEQ subsystem (8)

CommandWhat it doesArguments
:SEQuence:COLumn <Column>,'<Label>',<Base>Set PG Column. Sets the sequence column order and number base of a label (requires pattern generator option).Number; Text; Text: BINary,OCTal,DECimal,HEXadecimal,ASCii,SYMBol,TWOs
:SEQuence:EPATtern <Event>,<Pattern_Spec>Set PG Event Pattern. Sets the input qualifier pattern (0-255) for WAIT/IF events (requires pattern generator option).Text: A,B,C,D,IF; Number: 0,255
:SEQuence:INSert <Line>,<Instruction>,<Data_Values>Insert PG Vector. Inserts a sequence line after the given line with comma-separated quoted label values (e.g. '#H7F','#HFF') (requires pattern generator option).Number; Text: NOOP,SIGNal,BREAK; Text
:SEQuence:INSert <Line>,WAIT,<Event>,<Data_Values>Insert PG Wait. Inserts a WAIT line that waits for an event pattern (requires pattern generator option).Number; Text: A,B,C,D,IMB; Text
:SEQuence:INSert <Line>,REPeat,<Count>,<Data_Values>Insert PG Repeat. Inserts a REPeat loop (1-20000) with one data line (requires pattern generator option).Number; Number: 1,20000; Text
:SEQuence:PROGram? <Line>Read PG Program Line. Returns the instruction and data of a sequence line (requires pattern generator option).Number
:SEQuence:REMove <Line>Remove PG Line. Deletes one sequence line (requires pattern generator option).Number
:SEQuence:REMove ALLRemove PG Program. Deletes the entire pattern generator program (requires pattern generator option).None

Waveform (WAVeform) (6)

CommandWhat it doesArguments
:WAVeform:SOURce CHANnel<Channel>Set Scope Waveform Source. Selects the channel for waveform data transfer (requires oscilloscope option).Number: 1,2
:WAVeform:FORMat <Format>Set Scope Waveform Format. Sets the waveform transfer format (requires oscilloscope option).Text: BYTE,WORD,ASCii
:WAVeform:RECord <Record>Set Scope Waveform Record. Transfers the full 8000-point record or only the displayed window (requires oscilloscope option).Text: FULL,WINDow
:WAVeform:SOURce CHANnel<Channel>;DATA?Read Scope Waveform Data. Returns the waveform record of the channel as block data (requires oscilloscope option).Number: 1,2
:WAVeform:SOURce CHANnel<Channel>;PREamble?Read Scope Waveform Preamble. Returns format,type,points,count,X/Y increment,origin,reference (requires oscilloscope option).Number: 1,2
:WAVeform:VALid?Read Scope Waveform Valid. Returns 1 if valid data has been acquired on all channels (requires oscilloscope option).None

FORM subsystem (6)

CommandWhat it doesArguments
:FORMat:CLOCk INTernal,<Period>Set PG Clock Internal. Selects the internal clock with the given period (s) (requires pattern generator option).Number
:FORMat:CLOCk EXTernal,<Range>Set PG Clock External. Selects an external clock: <=50 MHz, 50-100 MHz or >100 MHz (requires pattern generator option).Text: LEFifty,GTFifty,GTONe
:FORMat:MODe <Mode>Set PG Channel Mode. Sets full-channel (up to 100 MHz) or half-channel (over 100 MHz) output mode (requires pattern generator option).Text: FULL,HALF
:FORMat:LABel '<Label>',<Polarity>,<Pod_Bits>Set PG Label. Creates or modifies an output label: polarity and comma-separated pod masks (0-255 each) (requires pattern generator option).Text; Text: POSitive,NEGative; Text
:FORMat:REMove '<Label>'Remove PG Label. Deletes one pattern generator label (requires pattern generator option).Text
:FORMat:REMove ALLRemove All PG Labels. Deletes all pattern generator labels (requires pattern generator option).None

BEEP subsystem (4)

CommandWhat it doesArguments
:BEEPerBeep. Sounds the beeper once without changing the beeper mode.None
:BEEPer ONBeeper On. Turns the beeper mode on.None
:BEEPer OFFBeeper Off. Turns the beeper mode off.None
:BEEPer?Read Beeper. Returns the beeper mode (1=on, 0=off).None

Channels (CHANnel) (4)

CommandWhat it doesArguments
:CHANnel<Channel>:COUPling <Coupling>Set Scope Coupling. Sets channel input coupling: 1 MOhm DC, 1 MOhm AC or 50 Ohm DC (requires oscilloscope option).Number: 1,2; Text: DC,AC,DCFifty
:CHANnel<Channel>:RANGe <Range>Set Scope Range. Sets the full-scale vertical range (16 mV to 40 V at 1:1 probe) (requires oscilloscope option).Number: 1,2; Number: 0.016,40
:CHANnel<Channel>:OFFSet <Offset>Set Scope Offset. Sets the voltage at center screen for the channel (requires oscilloscope option).Number: 1,2; Number: -250,250
:CHANnel<Channel>:PROBe <Attenuation>Set Scope Probe. Sets the probe attenuation factor 1-1000 (requires oscilloscope option).Number: 1,2; Number: 1,1000

Trigger (TRIGger) (4)

CommandWhat it doesArguments
:TRIGger:MODE <Mode>Set Scope Trigger Mode. Sets the scope trigger mode (requires oscilloscope option).Text: EDGE,PATTern,IMMediate
:TRIGger:SOURce CHANnel<Channel>Set Scope Trigger Source. Selects the edge trigger source channel (requires oscilloscope option).Number: 1,2
:TRIGger:SLOPe <Slope>Set Scope Trigger Slope. Sets the edge trigger slope of the current source (requires oscilloscope option).Text: POSitive,NEGative
:TRIGger:MODE EDGE;SOURce CHANnel<Channel>;LEVel <Level>Set Scope Trigger Level. Sets the edge trigger level (V) on a channel (requires oscilloscope option).Number: 1,2; Number: -6.0,6.0

LOCK subsystem (3)

CommandWhat it doesArguments
:LOCKout ONLockout On. Locks out all front-panel controls except the power switch.None
:LOCKout OFFLockout Off. Restores front-panel operation.None
:LOCKout?Read Lockout. Returns the front-panel lockout state (1=locked, 0=unlocked).None

WLIS subsystem (3)

CommandWhat it doesArguments
:WLISt:XTIMe <Time>Set Mixed X Time. Places the X marker on the mixed-mode timing waveforms (state analyzer needs time tagging).Number
:WLISt:OTIMe <Time>Set Mixed O Time. Places the O marker on the mixed-mode timing waveforms.Number
:WLISt:XOTime?Read Mixed XO Time. Returns the time from X to O marker in mixed mode (9.9E37 if invalid).None

Timebase (TIMebase) (3)

CommandWhat it doesArguments
:TIMebase:RANGe <Range>Set Scope Timebase Range. Sets the full-scale horizontal time (10 x s/div, 1 ns to 5 s) (requires oscilloscope option).Number: 1e-9,5
:TIMebase:DELay <Delay>Set Scope Timebase Delay. Sets the time from trigger to screen center (-2500 s to +2500 s) (requires oscilloscope option).Number: -2500,2500
:TIMebase:MODE <Mode>Set Scope Timebase Mode. Sets the timebase to triggered or auto-trigger mode (requires oscilloscope option).Text: TRIGgered,AUTO

STEP subsystem (3)

CommandWhat it doesArguments
:STEP <Count>Set PG Step Count. Sets the number of vectors (1-100000) for each STEP (requires pattern generator option).Number: 1,100000
:STEPPG Step. Steps the pattern generator through the step count of vectors (requires pattern generator option).None
:STEP FSTatePG Step First State. Outputs the first vector of the sequence (requires pattern generator option).None

SEL subsystem (2)

CommandWhat it doesArguments
:SELect <Module>Select Module. Selects which module has parser control: 0=system, 1=logic analyzer, 2=oscilloscope or pattern generator option.Number: 0,1,2
:SELect?Read Selected Module. Returns the currently selected module (0=system, 1=logic analyzer).None

RMOD subsystem (2)

CommandWhat it doesArguments
:RMODe <Mode>Set Run Mode. Sets the run mode to single or repetitive acquisition.Text: SINGle,REPetitive
:RMODe?Read Run Mode. Returns the current run mode (SINGle or REPetitive).None

ARML subsystem (2)

CommandWhat it doesArguments
:ARMLine <Machine>Set Arm Line. Selects which analyzer generates the arm-out signal (valid only when both analyzers are on).Text: MACHine1,MACHine2
:ARMLine?Read Arm Line. Returns which machine generates the arm-out signal.None

DBL subsystem (2)

CommandWhat it doesArguments
:DBLock <Format>Set Data Block Format. Sets the SYSTem:DATA? block format: PACKed (reloadable) or UNPacked (easy to parse).Text: PACKed,UNPacked
:DBLock?Read Data Block Format. Returns the current data block format (PACKed or UNPacked).None

Acquisition (ACQuire) (2)

CommandWhat it doesArguments
:ACQuire:TYPE <Type>Set Scope Acquire Type. Sets the acquisition type to normal or average (requires oscilloscope option).Text: NORMal,AVERage
:ACQuire:COUNt <Count>Set Scope Average Count. Sets the number of averages in AVERage mode (requires oscilloscope option).Number: 2,4,8,16,32,64,128,256

STAR subsystem (1)

CommandWhat it doesArguments
:STARtStart. Starts the acquisition (or pattern generator program) in the selected run mode; overlapped command.None

Run control (1)

CommandWhat it doesArguments
:STOPStop. Stops the acquisition (or pattern generator program); overlapped command.None

MENU subsystem (1)

CommandWhat it doesArguments
:MENU <Module>,<Menu>Show Menu. Displays a menu: module 0=system or 1=analyzer; menu index per Table 9-5 (e.g. 1,1=Analyzer Configuration, 1,8=Listing 1).Number: 0,1; Number: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14

RTC subsystem (1)

CommandWhat it doesArguments
:RTC?Read RTC. Returns the real-time clock as day,month,year,hour,minute,second.None

SYS subsystem (1)

CommandWhat it doesArguments
:SYStem:SETup?Read System Setup. Returns the current analyzer configuration as IEEE 488.2 block data.None

Auto setup (1)

CommandWhat it doesArguments
:AUToscaleScope Autoscale. Automatically sets vertical, trigger and timebase settings for the input signals (requires oscilloscope option).None

DIG subsystem (1)

CommandWhat it doesArguments
:DIGitizeScope Digitize. Acquires waveform data for transfer (overlapped; check completion before reading) (requires oscilloscope option).None

RES subsystem (1)

CommandWhat it doesArguments
:RESumePG Resume. Resumes program execution after a BREAK instruction (requires pattern generator option).None

Other subsystem (1)

CommandWhat it doesArguments
<Output Variable>=<Equation>Math. Variable equals an equation like (${Var_name}= ${Var_name}/2)Number; Text

WAIT subsystem (1)

CommandWhat it doesArguments
wait(<ms>)Wait. Waits for number of millisecondsNumber

SAVE subsystem (1)

CommandWhat it doesArguments
save2var <Variable_name>Save2Variable. Saves last measurement to a variableText

IEEE 488.2 common commands (15)

CommandWhat it doesArguments
*IDN?Identify. Returns the identification string Agilent,1670G,0,REV <revision>.None
*RSTReset. Accepted for compatibility but has no effect on the 1670G-series (load a configuration file instead).None
*CLSClear Status. Clears all event status registers, queues and the error queue.None
*ESE <Mask>Set Event Status Enable. Sets the Standard Event Status Enable register (0-255).Number: 0,255
*ESE?Read Event Status Enable. Returns the Standard Event Status Enable register.None
*ESR?Read Event Status Register. Returns and clears the Standard Event Status register.None
*SRE <Mask>Set Service Request Enable. Sets the Service Request Enable register (0-255).Number: 0,255
*SRE?Read Service Request Enable. Returns the Service Request Enable register.None
*STB?Read Status Byte. Returns the status byte (bit 0 = module summary, 4 = MAV, 5 = ESB, 6 = MSS).None
*OPT?Read Options. Returns the installed software options and module software.None
*TST?Self Test. Returns the power-up self-test result bit map (0 = all passed).None
*OPCOperation Complete Set. Sets the OPC bit in the event status register when STARt/STOP operations complete.None
*OPC?Operation Complete. Returns 1 when all pending operations are complete.None
*WAIWait To Continue. Waits until all overlapped commands (STARt/STOP) complete before continuing.None
*TRGTrigger Bus. Starts an intermodule group run (same as GET); no effect if no group run is configured.None

Where these commands come from

This reference is generated from TestFlow's instrument library, which is drafted from Keysight's programming documentation for the 1670G, 1671G, 1672G, and 1673G and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Keysight's programming manual: check it before you rely on an edge case. Last updated September 28, 2026.

Frequently asked questions

Does the Keysight 1670G support SCPI remote control?

Yes. The Keysight 1670G accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 248 SCPI commands for it: 72 queries that read values or state, and 176 settings and actions.

How do I control the Keysight 1670G from Python?

Install PyVISA and a VISA backend, find the instrument's address with ResourceManager().list_resources(), open it, then send commands with write() and read values with query(). The example on this page sends *IDN?, :MMEMory:AUToload OFF and :MEASure:SOURce CHANnel1;FREQuency?.

Which command reads a value from the Keysight 1670G?

:MEASure:SOURce CHANnel1;FREQuency? (measure scope frequency). Returns the frequency in Hz of the channel (9.9E37 if not measurable) (requires oscilloscope option). The full list of queries is in the command reference on this page, grouped by subsystem.

Can I automate the Keysight 1670G without writing code?

Yes. TestFlow is an AI agent for electronics testing: you describe the test, and it builds the automation from this command library, runs it on the Keysight 1670G through the TestFlow desktop app, and writes the report from the measured results.

Your next test, automated today

Describe the test. TestFlow builds the workflow, runs it on your instruments, and writes the report. See it on a bench like yours.