Rhode&Schwarz Source
Bases: VisaDriver
A driver for controlling Rohde & Schwarz signal generators via the VISA interface.
This class provides methods to control and query the Rohde & Schwarz signal generators, including setting and querying the output power, frequency, and output state.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_location |
str
|
The VISA resource name used to connect to the device. |
required |
Initialize the RhodeSchwarzSource object with the specified resource location.
The constructor configures the communication termination character as a newline character.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_location |
str
|
The VISA resource name used to connect to the device. |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
18 19 20 21 22 23 24 25 26 |
|
idn
property
idn
Retrieve the identification string.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The identification string of the device. |
close
close()
Close the connection to the device.
Source code in driverlib/visa_driver.py
114 115 116 |
|
get_error
get_error()
Retrieve the error message from the device.
Returns:
Name | Type | Description |
---|---|---|
str |
The error message. |
Source code in driverlib/visa_driver.py
127 128 129 130 131 132 133 |
|
print_error
print_error()
Print eventual errors occurred.
Source code in driverlib/visa_driver.py
135 136 137 |
|
reset
reset()
Reset instrument to factory default state. Does not clear volatile memory.
Source code in driverlib/visa_driver.py
139 140 141 142 |
|
clear
clear()
Clear event register, error queue -when power is cycled-.
Source code in driverlib/visa_driver.py
144 145 146 147 |
|
lookup_resources
lookup_resources()
Look for all the available resources.
Source code in driverlib/visa_driver.py
149 150 151 152 153 154 155 156 157 158 159 160 |
|
get_power
get_power()
Query the output power of the signal generator.
Returns:
Name | Type | Description |
---|---|---|
float |
The output power in dBm. |
Source code in driverlib/rhode_schwarz/rs_source.py
28 29 30 31 32 33 34 |
|
set_power
set_power(value)
Set the output power of the signal generator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
float
|
The desired output power in dBm. |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
36 37 38 39 40 41 42 |
|
get_frequency
get_frequency()
Query the frequency of the signal generator.
Returns:
Name | Type | Description |
---|---|---|
float |
The frequency in Hz. |
Source code in driverlib/rhode_schwarz/rs_source.py
46 47 48 49 50 51 52 |
|
set_frequency
set_frequency(value)
Set the frequency of the signal generator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
float
|
The desired frequency in Hz. |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
54 55 56 57 58 59 60 |
|
get_output
get_output()
Query the output state of the signal generator.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the output is enabled, False otherwise. |
Source code in driverlib/rhode_schwarz/rs_source.py
64 65 66 67 68 69 70 |
|
set_output
set_output(value)
Set the output state of the signal generator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
bool | ON | OFF | 0 | 1
|
The desired output state. True to enable the output, False to disable it. |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
72 73 74 75 76 77 78 79 80 81 |
|
get_modulation
get_modulation()
Query the modulation state the signal generator.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the modulation output is enabled, False otherwise. |
Source code in driverlib/rhode_schwarz/rs_source.py
85 86 87 88 89 90 91 |
|
set_modulation
set_modulation(value)
Turn on or off the modulation output state of the signal generator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
bool | ON | OFF | 0 | 1
|
The desired output state. True to enable the output, False to disable it. |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
93 94 95 96 97 98 99 100 101 102 |
|
get_modulation_frequency
get_modulation_frequency()
Get the modulation frequency of the signal generator.
Returns:
Name | Type | Description |
---|---|---|
float |
Frequency of the modulation in Hz. |
Source code in driverlib/rhode_schwarz/rs_source.py
106 107 108 109 110 111 112 |
|
set_modulation_frequency
set_modulation_frequency(value)
Set the modulation frequency of the signal generator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
float
|
The desired modulation frequency in Hz. |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
114 115 116 117 118 119 120 |
|
get_phase_modulation_state
get_phase_modulation_state()
Query the phase modulation state of the signal generator.
Returns:
Name | Type | Description |
---|---|---|
bool |
True if phase modulation is enabled, False otherwise. |
Source code in driverlib/rhode_schwarz/rs_source.py
124 125 126 127 128 129 130 |
|
set_phase_modulation_state
set_phase_modulation_state(value)
Set the phase modulation state of the signal generator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
bool | ON | OFF | 0 | 1
|
The desired phase modulation state. True to enable phase modulation, False to disable it. |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
132 133 134 135 136 137 138 139 140 141 142 |
|
set_amplitude_modulation_state
set_amplitude_modulation_state(value)
Set the amplitude modulation state of the signal generator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
bool | ON | OFF | 0 | 1
|
The desired amplitude modulation state. True to enable amplitude modulation, False to disable it. |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
146 147 148 149 150 151 152 153 154 155 156 |
|
get_amplitude_modulation_state
get_amplitude_modulation_state()
Query the amplitude modulation state of the signal generator.
Returns:
Name | Type | Description |
---|---|---|
bool |
True if amplitude modulation is enabled, False otherwise. |
Source code in driverlib/rhode_schwarz/rs_source.py
158 159 160 161 162 163 164 |
|
set_phase_modulation_source
set_phase_modulation_source(value)
Set the phase modulation source of the signal generator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
Literal['INT', 'EXT']
|
The desired phase modulation source. Must be either "INT" or "EXT". |
required |
Source code in driverlib/rhode_schwarz/rs_source.py
168 169 170 171 172 173 174 175 176 177 |
|
get_phase_modulation_source
get_phase_modulation_source()
Query the phase modulation source of the signal generator.
Returns:
Name | Type | Description |
---|---|---|
str |
The current phase modulation source. Either "INT" or "EXT". |
Source code in driverlib/rhode_schwarz/rs_source.py
179 180 181 182 183 184 185 |
|