Signal Generator

Bases: PicoScopeBase, Sharedps5000aPs6000a

PicoScope 5000 (A) API specific functions

Methods:

Name Description
set_siggen

Set the Signal Generator to the following specifications.

set_siggen_properties_arbitrary

Set the properties for the arbitrary waveform generator. All values can be reprogrammed

set_siggen_properties_built_in

Set the properties for the built-in waveform generator. All values can be reprogrammed

siggen_arbitrary_min_max_values

Returns the minimum and maximum values for the arbitrary waveform generator.

siggen_frequency_to_phase

Convert a frequency to a phase count for use with the AWG. This value depends on the

siggen_software_control

This function causes a trigger event, or starts and stops gating, for the signal generator.

set_siggen(frequency, pk2pk, wave_type, offset=0, sweep=False, stop_freq=None, inc_freq=0, dwell_time=1, sweep_type=cst.SWEEP_TYPE.UP, **kwargs)

Set the Signal Generator to the following specifications.

Parameters:
  • frequency (float) –

    Frequency the SigGen will initially produce.

  • pk2pk (float) –

    Peak-to-peak voltage in volts (V)

  • wave_type (str | WAVEFORM) –

    Type of waveform to be generated.

  • offset (int, default: 0 ) –

    Offset in volts (V). Defaults to 0.

  • sweep (bool, default: False ) –

    If sweep is enabled, specify a stop_freq. Defaults to False.

  • stop_freq (float, default: None ) –

    Stop frequency in sweep mode. Defaults to None.

  • inc_freq (float, default: 0 ) –

    Frequency to increment in sweep mode. Defaults to 0.

  • dwell_time (float, default: 1 ) –

    Time of each step in sweep mode in seconds. Defaults to 1.

  • sweep_type (SWEEP_TYPE, default: UP ) –

    Sweep direction in sweep mode. Defaults to SWEEP_TYPE.UP.

  • operation (int) –

    Extra operations for the signal generator. Defaults to 0.

  • shots (int) –

    Sweep the frequency as specified by sweeps. Defaults to 0.

  • sweeps (int) –

    Produce number of cycles specified by shots. Defaults to 0.

  • trigger_type (int) –

    Type of trigger (edge or level) that will be applied to signal generator. Defaults to 0.

  • trigger_source (int) –

    The source that will trigger the signal generator. Defaults to 0.

  • ext_in_threshold (int) –

    Used to set trigger level for external trigger. Defaults to 0.

Returns:
  • int( int ) –

    Returned status of device.

set_siggen_properties_arbitrary(start_delta_phase, stop_delta_phase, increment, dwell, sweep_type=cst.SWEEP_TYPE.UP, shots=0, sweeps=0, trigger_type=cst.PICO_SIGGEN_TRIG_TYPE.PICO_SIGGEN_RISING, trigger_source=cst.PICO_SIGGEN_TRIG_SOURCE.PICO_SIGGEN_NONE, ext_in_threshold=0)

Set the properties for the arbitrary waveform generator. All values can be reprogrammed while the oscilloscope is waiting for a trigger.

Parameters:
  • start_delta_phase (int) –

    The start delta phase.

  • stop_delta_phase (int) –

    The stop delta phase.

  • increment (int) –

    The increment.

  • dwell (int) –

    The dwell.

  • sweep_type (SWEEP_TYPE, default: UP ) –

    The sweep type. Defaults to SWEEP_TYPE.UP.

  • shots (int, default: 0 ) –

    The shots. Defaults to 0.

  • sweeps (int, default: 0 ) –

    The sweeps. Defaults to 0.

  • trigger_type (PICO_SIGGEN_TRIG_TYPE, default: PICO_SIGGEN_RISING ) –

    The trigger type. Defaults to PICO_SIGGEN_TRIG_TYPE.NONE.

  • trigger_source (PICO_SIGGEN_TRIG_SOURCE, default: PICO_SIGGEN_NONE ) –

    The trigger source. Defaults to PICO_SIGGEN_TRIG_SOURCE.NONE.

  • ext_in_threshold (int, default: 0 ) –

    The external input threshold. Defaults to 0.

set_siggen_properties_built_in(frequency, stop_frequency, increment, dwell_time, sweep_type=cst.SWEEP_TYPE.UP, shots=0, sweeps=0, trigger_type=cst.PICO_SIGGEN_TRIG_TYPE.PICO_SIGGEN_RISING, trigger_source=cst.PICO_SIGGEN_TRIG_SOURCE.PICO_SIGGEN_NONE, ext_in_threshold=0)

Set the properties for the built-in waveform generator. All values can be reprogrammed while the oscilloscope is waiting for a trigger.

Parameters:
  • frequency (float) –

    The startfrequency.

  • stop_frequency (float) –

    The stop frequency.

  • increment (float) –

    The increment.

  • dwell_time (float) –

    The dwell time.

  • sweep_type (SWEEP_TYPE, default: UP ) –

    The sweep type. Defaults to SWEEP_TYPE.UP.

  • shots (int, default: 0 ) –

    The shots. Defaults to 0.

  • sweeps (int, default: 0 ) –

    The sweeps. Defaults to 0.

  • trigger_type (PICO_SIGGEN_TRIG_TYPE, default: PICO_SIGGEN_RISING ) –

    The trigger type. Defaults to PICO_SIGGEN_TRIG_TYPE.NONE.

  • trigger_source (PICO_SIGGEN_TRIG_SOURCE, default: PICO_SIGGEN_NONE ) –

    The trigger source. Defaults to PICO_SIGGEN_TRIG_SOURCE.NONE.

  • ext_in_threshold (int, default: 0 ) –

    The external input threshold. Defaults to 0.

siggen_arbitrary_min_max_values()

Returns the minimum and maximum values for the arbitrary waveform generator.

Returns:
  • dict[str, int]

    dict[str, int]: Dictionary with keys "min_value", "max_value", "min_size", and "max_size".

  • min_value( dict[str, int] ) –

    The minimum value.

  • max_value( dict[str, int] ) –

    The maximum value.

  • min_size( dict[str, int] ) –

    The minimum size.

  • max_size( dict[str, int] ) –

    The maximum size.

siggen_frequency_to_phase(frequency, buffer_length, index_mode=cst.AWG_INDEX_MODE.SINGLE)

Convert a frequency to a phase count for use with the AWG. This value depends on the length of the AWG buffer.

Parameters:
  • frequency (float) –

    The frequency to convert to a phase count.

  • buffer_length (int) –

    The length of the AWG buffer.

  • index_mode (AWG_INDEX_MODE, default: SINGLE ) –

    The index mode to use. Defaults to AWG_INDEX_MODE.SINGLE.

Returns:
  • int( int ) –

    The phase count.

siggen_software_control(state)

This function causes a trigger event, or starts and stops gating, for the signal generator.

Parameters:
  • state (bool) –

    True sets the gate signal high, False sets it low.

Returns:
  • int( int ) –

    The status from the device. 0 for success, >0 for error.