Tektronix AFG
Bases: VisaDriver
A class representing a Tektronix Arbitrary Function Generator (AFG).
Initialize the AFG object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource_location |
str
|
The resource location of the AFG. |
required |
model_name |
str
|
The model name of the AFG. |
required |
Source code in driverlib/tektronix/tektronix_afg.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
idn
property
idn
Retrieve the identification string.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The identification string of the device. |
output_enabled
property
writable
output_enabled
Get the output state of the AFG.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
The output state of the AFG. |
am
property
writable
am
Get the amplitude modulation state of the AFG.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
The amplitude modulation state of the AFG. |
fm
property
writable
fm
Get the frequency modulation state of the AFG.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
The frequency modulation state of the AFG. |
pm
property
writable
pm
Get the phase modulation state of the AFG.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
The phase modulation state of the AFG. |
pwm
property
writable
pwm
Get the pulse width modulation state of the AFG.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
The pulse width modulation state of the AFG. |
waveform
property
writable
waveform
Get the waveform shape of the AFG.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The waveform shape of the AFG. |
duty_cycle_high
property
writable
duty_cycle_high
Get the duty cycle high value of the AFG.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The duty cycle high value of the AFG. |
impedance
property
writable
impedance
Get the output impedance of the AFG.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The output impedance of the AFG. |
polarity
property
writable
polarity
Get the output polarity of the AFG.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The output polarity of the AFG. |
trigger_out_mode
property
writable
trigger_out_mode
Get the trigger output mode of the AFG.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The trigger output mode of the AFG. |
ref_oscillator
property
writable
ref_oscillator
Get the reference oscillator source of the AFG.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The reference oscillator source of the AFG. |
amplitude_lock
property
writable
amplitude_lock
Check if the voltages of both channels are locked to each other.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the voltages of both channels are locked, False otherwise. |
frequency_lock
property
writable
frequency_lock
Check if the frequencies of both channels are locked to each other.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the frequencies of both channels are locked, False otherwise. |
amplitude
property
writable
amplitude
Get the signal amplitude in Vpp.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The signal amplitude in Vpp. |
frequency
property
writable
frequency
Get the frequency of the AFG.
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The frequency of the AFG. |
phase
property
writable
phase
Get or set the phase in degrees.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
float
|
The phase to set in degrees. Defaults to 0. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The phase in degrees. |
offset
property
writable
offset
Get or set the offset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
val |
float
|
The offset to set. Defaults to 0. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The offset. |
high
property
writable
high
Get or set the high value for voltage.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
float
|
The high value for voltage to set. Defaults to 0. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The high value for voltage. |
low
property
writable
low
Get or set the low value for voltage.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
float
|
The low value for voltage to set. Defaults to 0. |
required |
Returns:
Name | Type | Description |
---|---|---|
float |
float
|
The low value for voltage. |
trigger_source
property
writable
trigger_source
Get or set the trigger source of the AFG.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The trigger source of the AFG. |
trigger_slope
property
writable
trigger_slope
Get or set the trigger slope of the AFG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
val |
str
|
The trigger slope to set. Defaults to "POS". |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The trigger slope of the AFG. |
trigger_timer
property
writable
trigger_timer
Get or set the trigger timer of the AFG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
float
|
The trigger timer to set. Defaults to 1. |
required |
Returns: float: The trigger timer of the AFG.
burst_enabled
property
writable
burst_enabled
Get or set the burst mode state of the AFG.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
If burst mode is enabled. |
burst_cycles
property
writable
burst_cycles
Get or set the number of burst cycles of the AFG.
burst_delay
property
writable
burst_delay
Get or set the burst delay of the AFG.
burst_mode
property
writable
burst_mode
Get or set the burst mode of the AFG.
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 |
|
recall
recall(num='1')
Recall a saved configuration on the AFG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num |
str
|
The number of the saved configuration. Defaults to "1". |
'1'
|
Source code in driverlib/tektronix/tektronix_afg.py
32 33 34 35 36 37 38 39 |
|
save
save(num='1')
Save the current configuration on the AFG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
num |
str
|
The number to save the configuration as. Defaults to "1". |
'1'
|
Source code in driverlib/tektronix/tektronix_afg.py
41 42 43 44 45 46 47 48 |
|
calibrate
calibrate()
Perform calibration on the AFG.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if calibration is successful, False otherwise. |
Source code in driverlib/tektronix/tektronix_afg.py
165 166 167 168 169 170 171 172 |
|
phase_initiate
phase_initiate()
Initialize the phase of the AFG.
Source code in driverlib/tektronix/tektronix_afg.py
174 175 176 177 178 |
|
trigger
trigger()
Trigger the measurement.
Source code in driverlib/tektronix/tektronix_afg.py
502 503 504 |
|
sweep
sweep(start_freq, stop_freq, sweep_time)
Perform a frequency sweep on the AFG.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start_freq |
float
|
The starting frequency of the sweep. |
required |
stop_freq |
float
|
The stopping frequency of the sweep. |
required |
sweep_time |
float
|
The duration of the sweep in seconds. |
required |
Source code in driverlib/tektronix/tektronix_afg.py
550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
|