Base class for the ps2000 and ps3000 PicoScopes.
- class msl.equipment.resources.picotech.picoscope.picoscope_2k3k.PicoScope2k3k(record, func_ptrs)¶
Use the PicoScope SDK to communicate with ps2000 and ps3000 oscilloscopes.
Do not instantiate this class directly. Use the
connect()method to connect to the equipment.
- errcheck_zero(result, func, args)¶
If the SDK function returns 0 then raise an exception.
- errcheck_one(result, func, args)¶
If the SDK function returns 1 then raise an exception.
- errcheck_negative_one(result, func, args)¶
If the SDK function returns -1 then raise an exception.
Flashes the LED on the front of the oscilloscope three times and returns within one second.
This function is used to collect the next block of values while fast streaming is running. You must call
run_streaming_ns()beforehand to set up fast streaming.
- get_streaming_values(no_of_values, no_of_samples_per_aggregate)¶
This function is used after the driver has finished collecting data in fast streaming mode. It allows you to retrieve data with different aggregation ratios, and thus zoom in to and out of any region of the data.
This function retrieves raw streaming data from the driver’s data store after fast streaming has stopped.
- get_timebase(timebase, no_of_samples, oversample=0)¶
This function discovers which timebases are available on the oscilloscope. You should set up the channels using
set_channel()and, if required, ETS mode using
set_ets()first. Then call this function with increasing values of timebase, starting from 0, until you find a timebase with a sampling interval and sample count close enough to your requirements.
- get_times_and_values(time_units, no_of_values)¶
This function is used to get values and times in block mode after calling
This function opens a PicoScope 2000/3000 Series oscilloscope. The driver can support up to 64 oscilloscopes.
This function opens a PicoScope 2000/3000 Series oscilloscope without waiting for the operation to finish. You can find out when it has finished by periodically calling
open_unit_progress(), which returns a value of 100 when the scope is open.
The driver can support up to 64 oscilloscopes.
This function checks on the progress of
The function will return a value from 0 to 100, where 100 implies that the operation is complete.
This function indicates whether or not the overview buffers used by
run_streaming_ns()have overrun. If an overrun occurs, you can choose to increase the overview_buffer_size argument that you pass in the next call to
- run_streaming_ns(sample_interval, time_units, max_samples, auto_stop, no_of_samples_per_aggregate, overview_buffer_size)¶
This function tells the scope unit to start collecting data in fast streaming mode . The function returns immediately without waiting for data to be captured. After calling this function, you should next call
get_streaming_last_values()to copy the data to your application’s buffer.
- set_adv_trigger_channel_directions(channel_a, channel_b, channel_c, channel_d, ext)¶
This function sets the direction of the trigger for each channel.
- set_adv_trigger_delay(delay, pre_trigger_delay)¶
This function sets the pre-trigger and post-trigger delays. The default action, when both these delays are zero, is to start capturing data beginning with the trigger event and to stop a specified time later. The start of capture can be delayed by using a nonzero value of
delay. Alternatively, the start of capture can be advanced to a time before the trigger event by using a negative value of
pre_trigger_delay. If both arguments are non-zero then their effects are added together.
- set_ets(mode, ets_cycles, ets_interleave)¶
This function is used to enable or disable ETS (equivalent time sampling) and to set the ETS parameters.
- set_trigger(source, threshold, direction, delay, auto_trigger_ms)¶
This function just calls
set_trigger2(), since Python supports a floating-point value for defining the
- set_trigger2(source, threshold, direction, delay, auto_trigger_ms)¶
This function is used to enable or disable triggering and its parameters. It has the same behaviour as
set_trigger(), except that the delay parameter is a floating-point value.
For oscilloscopes that support advanced triggering, see
set_adv_trigger_channel_conditions()and related functions.
- set_adv_trigger_channel_properties(channel_properties, auto_trigger_milliseconds)¶
This function is used to enable or disable triggering and set its parameters.