Component: PicoScope (3rd Party Equipment/Tools)
Author | Matrix Ltd |
Version | 1.0 (Release) |
Category | 3rd Party Equipment/Tools |
Contents
- 1 PicoScope component
- 2 Examples
- 3 Downloadable macro reference
- 4 Simulation macro reference
- 4.1 ps2000_get_timebase
- 4.2 ps2000_open_unit_progress
- 4.3 ps2000_flash_led
- 4.4 ps2000_stop
- 4.5 ps2000_get_unit_info
- 4.6 ps2000_set_channel
- 4.7 ps2000_get_times_and_values
- 4.8 ps2000_set_trigger
- 4.9 ps2000_set_sig_gen_built_in
- 4.10 ps2000_close_unit
- 4.11 ps2000_get_values
- 4.12 ps2000_run_block
- 4.13 ps2000_ready
- 4.14 ps2000_open_unit_async
- 4.15 ps2000_open_unit
- 5 Property reference
PicoScope component
A set of functions designed for interacting with a 2000 series Pico scope via simulation.
Examples
No additional examples
Downloadable macro reference
This component does not contain any downloadable macros
Simulation macro reference
ps2000_get_timebase
Returns details associated with the selected timebase index
Parameters
- INT Handle
- the handle of the required device.
- INT timebase
- The ps2000a API allows you to select any of 2 32 different timebases based on a maximum sampling rate of 1 GS/s.
- LONG no_of_samples
- number of samples required
- LONG time_interval
- time interval between readings at the selected timebase. Use NULL if not required.
- INT time_units
- INT oversample
- not used.
- LONG max_samples
- on exit, the maximum number of samples available.
Return value
ps2000_open_unit_progress
This function checks on the progress of a request made to ps2000aOpenUnitAsync to open a scope.
Parameters
- INT handle
- INT Progress
Return value
ps2000_flash_led
This function flashes the LED on the front of the scope without blocking the calling
thread.
Parameters
- INT handle
- handle of the scope device
Return value
ps2000_stop
This function stops the scope device from sampling data. If this function is called
before a trigger event occurs, the oscilloscope may not contain valid data.
Parameters
- INT Handle
Return value
ps2000_get_unit_info
This function retrieves information about the specified oscilloscope.
Parameters
- INT Handle
- the handle of the device
- <- STRING info_string
- unit information string
- This parameter may be returned back to the caller
- INT string_length
- the maximum number of chars in the string
- INT info_line
- a number specifying what information is required. 0=DriverVersion / 1=USBVersion / 2=HardwareVersion / 3=VariantInfo / 4=BatchAndSerial / 5=CalDate / 6=KernelVersion / 7=DigHardwareVersion / 8=AnHardwareVersion
Return value
ps2000_set_channel
This function specifies whether an input channel is to be enabled, its input coupling
type, voltage range, analog offset and bandwidth limit.
Parameters
- INT handle
- Handle of the device
- INT channel
- the channel to be configured. The values are: 0=ChanA / 1=ChanB
- INT enabled
- whether or not to enable the channel. The values are: 0=Disable / 1=Enable
- INT dc
- the impedance and coupling type. Values: 0=AC / 1=DC
- INT range
- the input voltage range: 0=50mV / 1=100mV / 2=200mV / 3=500mV / 4=1V / 5=2V / 6=5V / 7=10V / 8=20V
Return value
ps2000_get_times_and_values
No additional information
Parameters
- INT Handle
- LONG times
- INT buffer_a
- INT buffer_b
- INT buffer_c
- INT buffer_d
- INT overflow
- INT time_units
- LONG no_of_samples
Return value
ps2000_set_trigger
No additional information
Parameters
- INT handle
- INT source
- INT threshold
- INT direction
- INT delay
- INT auto_trigger_ms
Return value
ps2000_set_sig_gen_built_in
sets up the signal generator to produce a signal from a list of built-in waveforms
Parameters
- INT Handle
- Handle to the device
- LONG Offset_uV
- the voltage offset, in microvolts, to be applied to the waveform
- ULONG pk2pk_uV
- the peak-to-peak voltage, in microvolts, of the waveform
- INT waveType
- the type of waveform to be generated. 0=Sine / 1=Square / 2=Triangle / 3=RampUp / 4=RampDown / 5=Sinc / 6=Gaus / 7=HalfSine / 8=DC
- FLOAT startFrequency
- the frequency that the signal generator will initially produce
- FLOAT stopFrequency
- the frequency at which the sweep reverses direction or returns to initial
- FLOAT increment
- the amount of frequency increase or decrease in sweep mode
- FLOAT dwellTime
- the time for which the sweep stays at each frequency, in seconds
- INT sweepType
- whether the frequency will sweep from startFrequency to stopFrequency. 0=Up, 1=Down, 2=UpDown, 3=DownUp
- ULONG sweeps
- produce number of cycles specified by shots
Return value
ps2000_close_unit
This function shuts down an oscilloscope.
Parameters
- INT Handle
- The handle of the scope device to be closed
Return value
ps2000_get_values
This function returns block-mode data, with or without downsampling.
Parameters
- INT Handle
- the handle of the required device.
- INT buffer_a
- Start point for data collection
- INT buffer_b
- Number of samples
- INT buffer_c
- Down sample ratio
- INT buffer_d
- Down sample mode : 0=None / 1=Aggregate / 2=Decimate / 4=Average
- INT overflow
- Flags to indicate if an overflow has occurred
- LONG no_of_samples
Return value
ps2000_run_block
This function starts collecting data in block mode.
Parameters
- INT handle
- LONG no_of_samples
- INT timebase
- INT oversample
- LONG time_indisposed_ms
Return value
ps2000_ready
No additional information
Parameters
- INT Handle
Return value
ps2000_open_unit_async
This function opens a scope without blocking the calling thread.
Parameters
- This macro has no parameters
Return value
ps2000_open_unit
Returns a handle to the opened unit
Returns 0 if no unit found
Returns -1 if unit failed to open
Parameters
- This macro has no parameters
Return value
Property reference
This component does not contain any properties