This is an object representing the Rigol DG2052 function generator. This object uses the SCPI protocol for communicating with the Rigol DG2052 function generator.
| Method | __init__ |
Initializes the DG2052 object |
| Method | get |
Returns the output impedance. |
| Method | get |
Returns the output load. |
| Method | get |
Returns the signal type and parameters. |
| Method | get |
Returns the output state of the signal |
| Method | get |
Gets the output volt limits of the specified channel |
| Method | is |
Returns a boolean representing the state of the output |
| Method | set |
Sets the output channel to DC voltage mode |
| Method | set |
Sets the frequency of the set signal |
| Method | set |
Sets the output channel ON or OFF |
| Method | set |
Sets the output channel to A Ramp (Triangular) Wave |
| Method | set |
Sets the output channel to A Sine Wave |
| Method | set |
Sets the output channel to A Square Wave |
| Method | set |
Sets the parameters of a signal sweep |
| Method | toggle |
Toggles the corresponding output channel |
| Method | trigger |
Triggers a sweep manually (Only works if the sweep was setup with trigger_source as SweepTriggerSource.MANUAL) |
| Method | whoami |
Shows the identification of the connected instrument |
| Instance Variable | __comm |
Undocumented |
| Instance Variable | __port |
Undocumented |
| Instance Variable | __rm |
Undocumented |
Initializes the DG2052 object
| Parameters | |
port:str | The SCPI port describing the device, consists of a communication method and device port followed by the "::INSTR" keyword.
communication method: can be either format: " example: " |
Literal[ 1, 2], amp: float = 5, offset: float = 0, phase: int = 0, signal_type: SweepSignalType = SweepSignalType.SINE, htime_start: float = 0, htime_stop: float = 0, freq_start: float = 100, freq_stop: float = 1000.0, marker: bool = False, freq_marker: float = 550, rtime: float = 0, time: float = 1, spacing: SweepSpacing = SweepSpacing.LIN, step: int = 2, trigger_slope: SweepTriggerSlope = SweepTriggerSlope.POSITIVE, trigger_source: SweepTriggerSource = SweepTriggerSource.INTERNAL):
¶
Sets the parameters of a signal sweep
| Parameters | |
channel:Literal[1, 2] | Sets the output channel of the sweep function |
amp:float, default 5 | Sets the amplitude of the sweeped signal |
offset:float, default 0 | Sets the offset voltage of the sweeped signal |
phase:int, default 0 | Sets the phase shift of the sweeped signal |
signalSweepSignalType, default SweepSignalType.SINE | Sets the type of signal being sweeped |
htimefloat, default 0 | Sets the start hold time of the sweep function |
htimefloat, default 0 | Sets the stop hold time of the sweep function |
freqfloat, default 100 | Sets the sweep starting frequency |
freqfloat, default 1e3 | Sets the sweep stopping frequency |
marker:bool, default False | Enables/Disables setting the marker frequency manually |
freqfloat, default 550 | Sets the marker frequency at whic the Sync signal changes from high to low |
rtime:float, default 0 | Sets the return time of the sweep function |
time:float, default 1 | Sets the sweep time |
spacing:SweepSpacing, default SweepSpacing.LIN | Sets the sweep type |
step:int, default 2 | Sets the number of steps of the sweep function |
triggerSweepTriggerSlope, default SweepTriggerSlope.POSITIVE | Sets the edge type of the trigger input signal (for external trigger only) |
triggerSweepTriggerSource, default SweepTriggerSource.INTERNAL | Sets the sweep trigger source |
Toggles the corresponding output channel
| Parameters | |
channel:Literal[1, 2] | The output channel of the device (either 1 or 2) |
Triggers a sweep manually (Only works if the sweep was setup with trigger_source as SweepTriggerSource.MANUAL)
| Parameters | |
channel:Literal[1, 2] | Sets the output channel of the sweep function |
Shows the identification of the connected instrument
| Returns | |
str | The identification of the connected instrument |