ps5000a Reference
Initializing ps5000a
import pypicosdk as psdk
scope = psdk.ps5000a()
scope.open_unit()
# Do something
scope.close_unit()
Reference
Bases: PicoScopeBase
close_unit()
Closes the PicoScope device and releases the hardware handle.
This calls the PicoSDK CloseUnit
function to properly disconnect from the device.
Returns: |
|
---|
get_enumerated_units()
Returns count, serials and serial string length of a specific PicoScope unit.
Returns: |
|
---|
get_nearest_sampling_interval(interval_s)
This function returns the nearest possible sample interval to the requested sample interval. It does not change the configuration of the oscilloscope.
Channels need to be setup first before calculating as more channels may increase sample interval.
Parameters: |
|
---|
Returns: |
|
---|
get_time_axis(timebase, samples)
Return an array of time values based on the timebase and number of samples
Parameters: |
|
---|
Returns: |
|
---|
get_unit_info(unit_info)
Get specified information from unit. Use UNIT_INFO.XXXX or integer.
Parameters: |
|
---|
Returns: |
|
---|
get_unit_serial()
Get and return batch and serial of unit.
Returns: |
|
---|
get_values(samples, start_index=0, segment=0, ratio=0, ratio_mode=RATIO_MODE.RAW)
Retrieves a block of captured samples from the device once it's ready. If a channel goes over-range a warning will appear.
This function should be called after confirming the device is ready using is_ready()
.
It invokes the underlying PicoSDK GetValues
function to read the data into memory.
Parameters: |
|
---|
Returns: |
|
---|
is_over_range()
Logs and prints a warning if any channel has been over range.
Returns: |
|
---|
is_ready()
Blocks execution until the PicoScope device is ready.
Continuously calls the PicoSDK IsReady
function in a loop, checking if
the device is prepared to proceed with data acquisition.
Returns: |
|
---|
run_block_capture(timebase, samples, pre_trig_percent=50, segment=0)
Runs a block capture using the specified timebase and number of samples.
This sets up the PicoScope to begin collecting a block of data, divided into
pre-trigger and post-trigger samples. It uses the PicoSDK RunBlock
function.
Parameters: |
|
---|
Returns: |
|
---|
set_simple_trigger(channel, threshold_mv, enable=True, direction=TRIGGER_DIR.RISING, delay=0, auto_trigger_ms=5000)
Sets up a simple trigger from a specified channel and threshold in mV
Parameters: |
|
---|
stop()
This function stops the scope device from sampling data