pyscpi.keysight.osc#
Module Contents#
Functions#
|
Reads multiple channels from the oscilloscope. |
|
Reads a single channel from the oscilloscope. |
|
Autoscales the oscilloscope. |
|
Sets the time axis of the oscilloscope. |
|
Sets the channel axis (y-axis) of the oscilloscope. |
|
Sets the output state of the waveform generator. (Only available on specific models) |
|
Sets the waveform generator to a sine wave. (Only available on specific models) |
|
Sets the waveform generator to a square wave. (Only available on specific models) |
|
Sets the waveform generator to a ramp wave. (Only available on specific models) |
|
Sets the waveform generator to a pulse wave. (Only available on specific models) |
|
Sets the waveform generator to a DC wave. (Only available on specific models) |
|
Sets the waveform generator to a noise wave. (Only available on specific models) |
- pyscpi.keysight.osc.readChannels(inst, channels, points=0, runAfter=True, debug=False)[source]#
Reads multiple channels from the oscilloscope.
- Parameters:
- Returns:
A NumPy tuple of time and voltage arrays
- Return type:
tuple[numpy.ndarray, numpy.ndarray]
- pyscpi.keysight.osc.readSingleChannel(inst, channel, points=0, runAfter=True, debug=False)[source]#
Reads a single channel from the oscilloscope.
- Parameters:
- Returns:
A NumPy tuple of time and voltage arrays
- Return type:
tuple[numpy.ndarray, numpy.ndarray]
- pyscpi.keysight.osc.autoScale(inst)[source]#
Autoscales the oscilloscope.
- Parameters:
inst – The instrument object from pyscpi or pyvisa
- Return type:
None
- pyscpi.keysight.osc.setTimeAxis(inst, scale, position)[source]#
Sets the time axis of the oscilloscope.
- pyscpi.keysight.osc.setChannelAxis(inst, channel, scale, offset)[source]#
Sets the channel axis (y-axis) of the oscilloscope.
- pyscpi.keysight.osc.setWGenOutput(inst, state)[source]#
Sets the output state of the waveform generator. (Only available on specific models)
- pyscpi.keysight.osc.setWGenSin(inst, amp, offset, freq)[source]#
Sets the waveform generator to a sine wave. (Only available on specific models)
- pyscpi.keysight.osc.setWGenSquare(inst, v0, v1, offset, freq, dutyCycle)[source]#
Sets the waveform generator to a square wave. (Only available on specific models)
- Parameters:
inst – The instrument object from pyscpi or pyvisa
v0 (float) – The voltage of the low state in volts
v1 (float) – The voltage of the high state in volts
offset (float) – The offset of the square wave in volts
freq (float) – The frequency of the square wave in Hz. The frequency can be adjusted from 100 mHz to 20 MHz.
dutyCycle (int) – The duty cycle can be adjusted from 1% to 99% up to 500 kHz. At higher frequencies, the adjustment range narrows so as not to allow pulse widths less than 20 ns.
- Return type:
None
- pyscpi.keysight.osc.setWGenRamp(inst, v0, v1, offset, freq, symmetry)[source]#
Sets the waveform generator to a ramp wave. (Only available on specific models)
- Parameters:
inst – The instrument object from pyscpi or pyvisa
v0 (float) – The voltage of the low state in volts
v1 (float) – The voltage of the high state in volts
offset (float) – The offset of the ramp wave in volts
freq (float) – The frequency of the ramp wave in Hz. The frequency can be adjusted from 100 mHz to 100 kHz.
symmetry (float) – Symmetry represents the amount of time per cycle that the ramp waveform is rising and can be adjusted from 0% to 100%.
- Return type:
None
- pyscpi.keysight.osc.setWGenPulse(inst, v0, v1, offset, period, pulseWidth)[source]#
Sets the waveform generator to a pulse wave. (Only available on specific models)
- Parameters:
inst – The instrument object from pyscpi or pyvisa
v0 (float) – The voltage of the low state in volts
v1 (float) – The voltage of the high state in volts
offset (float) – The offset of the pulse wave in volts
period (float) – The period of the pulse wave in seconds. The period can be adjusted from 10 ns to 100 ns.
pulseWidth (float) – The pulse width can be adjusted from 20 ns to the period minus 20 ns.
- Return type:
None
- pyscpi.keysight.osc.setWGenDC(inst, offset)[source]#
Sets the waveform generator to a DC wave. (Only available on specific models)
- Parameters:
inst – The instrument object from pyscpi or pyvisa
offset (float) – The offset of the DC wave in volts
- Return type:
None