msl.equipment.resources.picotech.picoscope.ps4000 module
A wrapper around the PicoScope ps4000 SDK.
- class msl.equipment.resources.picotech.picoscope.ps4000.PicoScope4000(record)[source]
Bases:
PicoScopeApi
A wrapper around the PicoScope ps4000 SDK.
Do not instantiate this class directly. Use the
connect()
method to connect to the equipment.- Parameters:
record (
EquipmentRecord
) – A record from an Equipment-Register Database.
- MAX_OVERSAMPLE_12BIT = 16
- MAX_OVERSAMPLE_8BIT = 256
- PS4XXX_MAX_ETS_CYCLES = 400
- PS4XXX_MAX_INTERLEAVE = 80
- PS4262_MAX_VALUE = 32767
- PS4262_MIN_VALUE = -32767
- MAX_VALUE = 32764
- MIN_VALUE = -32764
- LOST_DATA = -32768
- EXT_MAX_VALUE = 32767
- EXT_MIN_VALUE = -32767
- MAX_PULSE_WIDTH_QUALIFIER_COUNT = 16777215
- MAX_DELAY_COUNT = 8388607
- MIN_SIG_GEN_FREQ = 0.0
- MAX_SIG_GEN_FREQ = 100000.0
- MAX_SIG_GEN_FREQ_4262 = 20000.0
- MIN_SIG_GEN_BUFFER_SIZE = 1
- MAX_SIG_GEN_BUFFER_SIZE = 8192
- MIN_DWELL_COUNT = 10
- PS4262_MAX_WAVEFORM_BUFFER_SIZE = 4096
- PS4262_MIN_DWELL_COUNT = 3
- MAX_SWEEPS_SHOTS = 1073741823
- get_trigger_channel_time_offset(segment_index, channel)[source]
This function gets the time, as two 4-byte values, at which the trigger occurred, adjusted for the time skew of the specified channel relative to the trigger source. Call it after block-mode data has been captured or when data has been retrieved from a previous block-mode capture.
- get_trigger_channel_time_offset64(segment_index, channel)[source]
This function gets the time, as a single 8-byte value, at which the trigger occurred, adjusted for the time skew of the specified channel relative to the trigger source. Call it after block-mode data has been captured or when data has been retrieved from a previous block-mode capture.
- get_values_trigger_channel_time_offset_bulk(from_segment_index, to_segment_index, channel)[source]
This function retrieves the time offset, as lower and upper 32-bit values, for a group of waveforms obtained in rapid block mode, adjusted for the time skew relative to the trigger source. The array size for
timesUpper
andtimesLower
must be greater than or equal to the number of waveform time offsets requested. The segment indexes are inclusive.
- get_values_trigger_channel_time_offset_bulk64(from_segment_index, to_segment_index, channel)[source]
This function retrieves the time offset, as a 64-bit integer, for a group of waveforms captured in rapid block mode, adjusted for the time skew relative to the trigger source. The array size of
times
must be greater than or equal to the number of waveform time offsets requested. The segment indexes are inclusive.
- open_unit_async_ex()[source]
This function opens a scope device selected by serial number without blocking the calling thread. You can find out when it has finished by periodically calling
open_unit_progress()
until that function returns a non-zero value.
- open_unit_ex()[source]
This function opens a scope device. The maximum number of units that can be opened is determined by the operating system, the kernel driver and the PC’s hardware.
- run_streaming_ex(sample_interval_time_units, max_pre_trigger_samples, max_post_pre_trigger_samples, auto_stop, down_sample_ratio, down_sample_ratio_mode, overview_buffer_size)[source]
This function tells the oscilloscope to start collecting data in streaming mode and with a specified data reduction mode. When data has been collected from the device it is aggregated and the values returned to the application. Call
get_streaming_latest_values()
to retrieve the data.
- set_bw_filter(channel, enable)[source]
This function enables or disables the bandwidth-limiting filter on the specified channel.
- set_data_buffer_with_mode(channel, buffer_length, mode)[source]
This function registers your data buffer, for non-aggregated data, with the PicoScope 4000 driver. You need to allocate the buffer before calling this function.