Clock Generator · SCPI command reference

Stanford Research Systems CG792 SCPI commands

The Stanford Research Systems CG792 clock generator is controlled remotely with SCPI commands. TestFlow's instrument library holds 107 commands for it, 50 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 CG792 on a real bench.

Commands
107
Queries
50
Subsystems
4
Models covered
1

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Stanford Research Systems CG792 and writes the report from the measured results.

Get started

Control the Stanford Research Systems CG792 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 Stanford Research Systems CG792's VISA address

# Paste the address of your Stanford Research Systems CG792 (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("SOURce1:REL")  # Set Relative Phase Zero
print(inst.query("MODulation:MODE?"))  # Read Modulation Mode

inst.close()

Run this on your bench

Describe the test; TestFlow's agent uses this command set to drive your Stanford Research Systems CG792 and writes the report from the measured results.

Get started

Run a CG792 test without writing code

Describe the test in a sentence, for example “set relative phase zero on the CG792, then read modulation mode 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

107 commands in 4 groups. A ? marks a query that returns a value. Placeholders in angle brackets take the listed values.

System (SYSTem) (46)

CommandWhat it doesArguments
SYSTem:REFerence:LOCK?Read Reference Lock. Reads whether the reference oscillator is locked (LOCKED or UNLOCKED).None
SYSTem:REFerence:EXTernal:STATus?Read External Reference Status. Reads the external 10 MHz reference input voltage in volts.None
SYSTem:REFerence:INTernal:TYPe?Read Internal Reference Type. Reads the installed internal reference type (e.g. TCXO, OCXO or Rubidium).None
SYSTem:REFerence:TCXO:FCONtrol <Trim>Set TCXO Trim. Sets the TCXO fractional frequency trim (-49999e-9 to 49999e-9; default 0.0).Number
SYSTem:REFerence:TCXO:FCONtrol?Read TCXO Trim. Reads the TCXO frequency trim.None
SYSTem:REFerence:OCXO:FCONtrol <Trim>Set OCXO Trim. Sets the OCXO fractional frequency trim (-0.4e-6 to +0.4e-6; requires the OCXO option).Number
SYSTem:REFerence:OCXO:FCONtrol?Read OCXO Trim. Reads the OCXO frequency trim.None
SYSTem:REFerence:OCXO:AGC?Read OCXO AGC. Reads the OCXO automatic gain control status (ON or OFF).None
SYSTem:REFerence:OCXO:HEAT?Read OCXO Heater. Reads whether the OCXO heater is active (ON or OFF).None
SYSTem:REFerence:OCXO:VARac?Read OCXO Varactor. Reads the OCXO varactor tuning voltage in volts.None
SYSTem:REFerence:RB:FCONtrol <Trim>Set Rb Trim. Sets the rubidium reference frequency trim (default 0.0; requires the rubidium option).Number
SYSTem:REFerence:RB:FCONtrol?Read Rb Trim. Reads the rubidium reference frequency trim.None
SYSTem:REFerence:RB:STATus?Read Rb Status. Reads the rubidium reference status code.None
SYSTem:REFerence:RB:TEMP<Sensor>?Read Rb Temperature. Reads a rubidium reference temperature sensor in degrees C.Number
SYSTem:DISPlay:LEVel <Level>Set Display Brightness. Sets the display brightness in percent (20 to 100; default 50).Number
SYSTem:DISPlay:LEVel?Read Display Brightness. Reads the display brightness in percent.None
SYSTem:DISPlay:OFF ONTurn On Display. Turns the display on (default).None
SYSTem:DISPlay:OFF OFFTurn Off Display. Turns the display off immediately.None
SYSTem:DISPlay:OFF <Timer>Set Display Auto Off. Sets the display auto-off timer (MIN=1 minute,1H,2H,4H,8H,DAY or WEEK).Text: MIN,1H,2H,4H,8H,DAY,WEEK
SYSTem:DISPlay:OFF?Read Display State. Reads the display state or auto-off setting.None
SYSTem:COMMunicate:LAN:DHCP ONTurn On DHCP. Enables DHCP on the LAN interface (default).None
SYSTem:COMMunicate:LAN:DHCP OFFTurn Off DHCP. Disables DHCP and uses static addressing.None
SYSTem:COMMunicate:LAN:DHCP?Read DHCP State. Reads the DHCP enable state (ON or OFF).None
SYSTem:COMMunicate:LAN:DHCP:STATus?Read DHCP Status. Reads the DHCP lease status description.None
SYSTem:COMMunicate:LAN:IPADdress <IP>Set IP Address. Sets the static IP address in dot notation (used when DHCP is disabled).Text
SYSTem:COMMunicate:LAN:IPADdress?Read IP Address. Reads the static IP address.None
SYSTem:COMMunicate:LAN:MAC?Read MAC Address. Reads the LAN MAC address.None
SYSTem:COMMunicate:LAN:RESetReset LAN Interface. Resets the LAN interface to apply new network settings (connection drops temporarily).None
SYSTem:COMMunicate:LAN:STATus?Read LAN Status. Reads the LAN link status (Connected or Disconnected).None
SYSTem:COMMunicate:SERial:BAUD <Baud>Set Serial Baud Rate. Sets the RS-232 baud rate (default 9600).Number: 9600,19200,38400,57600,115200
SYSTem:COMMunicate:SERial:BAUD?Read Serial Baud Rate. Reads the RS-232 baud rate.None
SYSTem:COMMunicate:USB:BAUD?Read USB Baud Rate. Reads the USB virtual COM port baud rate (always 115200).None
SYSTem:LOCK 1Turn On Remote Lockout. Enables remote lockout mode.None
SYSTem:LOCK 0Turn Off Remote Lockout. Disables remote lockout mode.None
SYSTem:BEEP OFFTurn Off Beep. Turns the beep sound off.None
SYSTem:BEEP LOWSet Beep Low. Sets the beep loudness to low (default).None
SYSTem:BEEP HIGHSet Beep High. Sets the beep loudness to high.None
SYSTem:BEEP?Read Beep. Reads the beep loudness setting.None
SYSTem:ERRor?Read Next Error. Reads and removes the next error from the error queue as code and message.None
SYSTem:ERRor:CLEARClear Error Queue. Clears all entries from the error queue.None
SYSTem:INFO:MEMory?Read Memory Usage. Reads the MPU and front-panel free memory in bytes.None
SYSTem:INFO:TEMPerature?Read Internal Temperature. Reads the MPU and front-panel processor temperatures in degrees C.None
SYSTem:INFO:UPTime?Read Uptime. Reads the time since the last reset or power-on in seconds.None
SYSTem:INFO:VOLTage?Read Supply Voltages. Reads the 15 internal power rail voltages as a comma-separated list.None
SYSTem:REBootReboot. Reboots the CG792 without saving the instrument settings.None
SYSTem:FACToryresetFactory Reset. Resets to the factory configuration and clears all stored settings including communication parameters.None

Source (SOURce) (26)

CommandWhat it doesArguments
SOURce<Ch>:FREQuency <Freq>Set Frequency. Sets the output frequency of a channel in Hz (1e-3 to 2.2e9; default 10e6) (channels 3 and 4 require the optional rear-panel clock channels).Number: 1,2,3,4; Number
SOURce<Ch>:FREQuency?Read Frequency. Reads the output frequency of a channel in Hz.Number: 1,2,3,4
SOURce<Ch>:FASTfrequency <Freq>Set Fast Frequency. Sets a channel frequency about 2x faster without parameter checking (do not change modulation or mode afterwards; reset and reboot to restore).Number: 1,2,3,4; Number
SOURce<Ch>:PHASe <Phase>Set Phase. Sets the phase offset of a channel in degrees (-720 to 720).Number: 1,2,3,4; Number
SOURce<Ch>:PHASe?Read Phase. Reads the phase offset of a channel in degrees (resolution-limited).Number: 1,2,3,4
SOURce<Ch>:EXTPhase?Read Precise Phase. Reads the phase offset of a channel in degrees with 15 decimal places.Number: 1,2,3,4
SOURce<Ch>:RELSet Relative Phase Zero. Defines the current phase of a channel as zero without changing the output.Number: 1,2,3,4
SOURce<Ch>:STATe ONTurn On Output. Enables the clock output of a channel.Number: 1,2,3,4
SOURce<Ch>:STATe OFFTurn Off Output. Disables the clock output of a channel and sets it to zero volts.Number: 1,2,3,4
SOURce<Ch>:STATe INVSet Output Invert Mode. Enables a channel with its differential outputs inverted while the rear digital modulation input is asserted.Number: 1,2,3,4
SOURce<Ch>:STATe BLANKSet Output Blank Mode. Enables a channel with its CMOS and differential outputs blanked while the rear digital modulation input is asserted.Number: 1,2,3,4
SOURce<Ch>:STATe PRBSSet Output PRBS. Enables a channel outputting a pseudo-random bit sequence (PRBS31 up to 100 MHz).Number: 1,2,3,4
SOURce<Ch>:STATe LOWSet Output Hold Low. Disables the clock of a channel and holds its output at the LOW level.Number: 1,2,3,4
SOURce<Ch>:STATe HIGHSet Output Hold High. Disables the clock of a channel and holds its output at the HIGH level.Number: 1,2,3,4
SOURce<Ch>:STATe?Read Output State. Reads the output state of a channel (OFF,ON,INV,BLANK,PRBS,LOW or HIGH).Number: 1,2,3,4
SOURce<Ch>:SYNC <RefCh>Sync Phase. Synchronizes the phase of channel Ch to channel RefCh by frequency detuning (only certain channel pairs can be synced directly).Number: 1,2,3,4; Number: 1,2,3,4
SOURce<Ch>:VOLTage:AMPLitude <Volt>Set Amplitude. Sets the differential output peak-to-peak amplitude of a channel in volts (0 to 1.2; default 1.0).Number: 1,2,3,4; Number
SOURce<Ch>:VOLTage:AMPLitude?Read Amplitude. Reads the differential output amplitude of a channel in volts.Number: 1,2,3,4
SOURce<Ch>:VOLTage:OFFSet <Volt>Set Offset. Sets the differential output DC offset of a channel in volts (-3 to 2; default 0.0).Number: 1,2,3,4; Number
SOURce<Ch>:VOLTage:OFFSet?Read Offset. Reads the differential output DC offset of a channel in volts.Number: 1,2,3,4
SOURce<Ch>:INST?Read Module Installed. Returns 1 if a source module is installed in channel position Ch or 0 otherwise.Number: 1,2,3,4
SOURce<Ch>:MODulation:DEViation <Dev>Set Modulation Deviation. Sets the modulation deviation of a channel (FM: fraction of carrier 0 to 75e-6; PM: seconds per volt of external input).Number: 1,2,3,4; Number
SOURce<Ch>:MODulation:DEViation?Read Modulation Deviation. Reads the modulation deviation of a channel.Number: 1,2,3,4
SOURce<Ch>:MODulation:JITTer ONTurn On Channel Jitter. Enables jitter modulation on a channel.Number: 1,2,3,4
SOURce<Ch>:MODulation:JITTer OFFTurn Off Channel Jitter. Disables jitter modulation on a channel (default).Number: 1,2,3,4
SOURce<Ch>:MODulation:JITTer?Read Channel Jitter State. Reads the jitter modulation state of a channel (ON or OFF).Number: 1,2,3,4

Modulation (20)

CommandWhat it doesArguments
MODulation:MODE OFFTurn Off Modulation. Disables modulation (default).None
MODulation:MODE <Mode>Set Modulation Mode. Sets the modulation mode (FM=frequency,PM=external phase,JITTER=jitter modulation).Text: FM,PM,JITTER
MODulation:MODE?Read Modulation Mode. Reads the modulation mode (OFF,FM,PM or JITTER).None
MODulation:TYPE <Type>Set Modulation Type. Sets the modulation waveform type.Text: SINe,TRIangle,RAMP,SQUare,NOISe,EXTernal
MODulation:TYPE?Read Modulation Type. Reads the modulation waveform type.None
MODulation:PERiod <Time>Set Modulation Period. Sets the modulation period in seconds (0.1e-3 to 5; default 1.0).Number
MODulation:PERiod?Read Modulation Period. Reads the modulation period in seconds.None
MODulation:PERiod:ACTual?Read Actual Modulation Period. Reads the effective modulation period in seconds after quantization.None
MODulation:RATE <Rate>Set Modulation Sample Rate. Sets the modulation sample rate in samples per second (range depends on the other modulation settings).Number
MODulation:RATE?Read Modulation Sample Rate. Reads the modulation sample rate in samples per second.None
MODulation:JITTer <Time>Set Jitter Magnitude. Sets the peak-to-peak jitter magnitude in seconds (0 to 3e-3; default 0).Number
MODulation:JITTer?Read Jitter Magnitude. Reads the peak-to-peak jitter magnitude in seconds.None
MODulation:BLANk ONTurn On Modulation Blanking. Enables modulation blanking (modulation zeroed while the rear digital input is asserted).None
MODulation:BLANk OFFTurn Off Modulation Blanking. Disables modulation blanking (default).None
MODulation:BLANk?Read Modulation Blanking. Reads the modulation blanking state (ON or OFF).None
MODulation:POLarity 0Set Blank Polarity Low. Holds the clock LOW while blanking is asserted (default).None
MODulation:POLarity 1Set Blank Polarity High. Holds the clock HIGH while blanking is asserted.None
MODulation:POLarity?Read Blank Polarity. Reads the blanking polarity (0=LOW or 1=HIGH).None
MODulation:ZERO 1Pause Modulation. Immediately pauses the modulation output without altering the settings.None
MODulation:ZERO 0Resume Modulation. Resumes a paused modulation output.None

IEEE 488.2 common commands (15)

CommandWhat it doesArguments
*SAV <Location>Save Settings. Saves the instrument settings to location 1 to 7 (location 0 holds the current settings).Number: 1,2,3,4,5,6,7
*RCL <Location>Recall Settings. Recalls the instrument settings from location 0 to 8 (0=startup settings,8=factory defaults).Number: 0,1,2,3,4,5,6,7,8
*ESE <Mask>Set Standard Event Enable. Sets the standard event status enable register (0 to 255).Number
*ESE?Read Standard Event Enable. Reads the standard event status enable register.None
*ESR?Read Standard Event Register. Reads and clears the standard event status register.None
*SRE <Mask>Set Service Request Enable. Sets the service request enable register (0 to 255).Number
*SRE?Read Service Request Enable. Reads the service request enable register.None
*STB?Read Status Byte. Reads the status byte (bit 2=error queue not empty,5=ESB,6=MSS) without clearing it.None
*IDN?Identify. Returns the instrument identification string (manufacturer, model, serial, firmware).None
*RSTReset. Restores factory default settings (equivalent to *RCL 8).None
*CLSClear Status. Clears the event registers and the error queue.None
*TST?Self Test. Runs the start-up self-test and returns PASS or FAIL.None
*OPCSet Operation Complete. Sets the OPC bit in the standard event status register when all prior commands have completed.None
*OPC?Operation Complete. Returns 1 when all pending operations are complete.None
*WAIWait To Continue. Waits until all prior commands have completed (commands already execute sequentially).None

Where these commands come from

This reference is generated from TestFlow's instrument library, which is drafted from Stanford Research Systems's programming documentation for the CG792 and checked when the agent runs it. Ranges, timing, and option-dependent commands are defined by Stanford Research Systems's programming manual: check it before you rely on an edge case. Last updated October 14, 2026.

Frequently asked questions

Does the Stanford Research Systems CG792 support SCPI remote control?

Yes. The Stanford Research Systems CG792 accepts SCPI commands over its remote interfaces. TestFlow's instrument library holds 107 SCPI commands for it: 50 queries that read values or state, and 57 settings and actions.

How do I control the Stanford Research Systems CG792 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?, SOURce1:REL and MODulation:MODE?.

Which command reads a value from the Stanford Research Systems CG792?

MODulation:MODE? (read modulation mode). Reads the modulation mode (OFF,FM,PM or JITTER). The full list of queries is in the command reference on this page, grouped by subsystem.

Can I automate the Stanford Research Systems CG792 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 Stanford Research Systems CG792 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.