Jump to content

Component: PicoScope (PS2000) (Test Equipment): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(5 intermediate revisions by 3 users not shown)
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/PS2000.fcsx FC_Comp_Source_temp/PS2000.fcsx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_PS2000.fcsx FC_Comp_Source_PS2000.fcsx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/PS2000.fcsx FC_Comp_Source_temp/PS2000.fcsx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_PS2000.fcsx FC_Comp_Source_PS2000.fcsx]


==Detailed description==
==Detailed description==
Line 70: Line 70:




 
''<span style="color:red;">No additional examples</span>''
 
 
 
 
 
 
An example project showing the capabilities of the Velleman K8055D board combined with a Pico Technology series 2 scope.
 
{{Fcfile|Velleman_and_Picoscope_v2.fcfx|Velleman and Picoscope Demo}}
 
 
 
 
 
 
 
 


==Macro reference==
==Macro reference==


===ps2000_close_unit===
===ps2000_close_unit===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_close_unit'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_close_unit'''
|-
|-
| colspan="2" | This function shuts down an oscilloscope.&nbsp;
| colspan="2" | This function shuts down an oscilloscope.&nbsp;
Line 111: Line 94:


===ps2000_flash_led===
===ps2000_flash_led===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_flash_led'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_flash_led'''
|-
|-
| colspan="2" | This function flashes the LED on the front of the scope without blocking the calling thread. &nbsp;
| colspan="2" | This function flashes the LED on the front of the scope without blocking the calling thread. &nbsp;
Line 130: Line 113:


===ps2000_get_timebase===
===ps2000_get_timebase===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_get_timebase'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_get_timebase'''
|-
|-
| colspan="2" | Returns details associated with the selected timebase index&nbsp;
| colspan="2" | Returns details associated with the selected timebase index&nbsp;
Line 179: Line 162:


===ps2000_get_times_and_values===
===ps2000_get_times_and_values===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_get_times_and_values'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_get_times_and_values'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 238: Line 221:


===ps2000_get_unit_info===
===ps2000_get_unit_info===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_get_unit_info'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_get_unit_info'''
|-
|-
| colspan="2" | This function retrieves information about the specified oscilloscope.&nbsp;
| colspan="2" | This function retrieves information about the specified oscilloscope.&nbsp;
Line 272: Line 255:


===ps2000_get_values===
===ps2000_get_values===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_get_values'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_get_values'''
|-
|-
| colspan="2" | This function returns block-mode data, with or without downsampling.&nbsp;
| colspan="2" | This function returns block-mode data, with or without downsampling.&nbsp;
Line 321: Line 304:


===ps2000_open_unit===
===ps2000_open_unit===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_open_unit'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_open_unit'''
|-
|-
| colspan="2" | Returns a handle to the opened unit Returns 0 if no unit found Returns -1 if unit failed to open&nbsp;
| colspan="2" | Returns a handle to the opened unit Returns 0 if no unit found Returns -1 if unit failed to open&nbsp;
Line 335: Line 318:


===ps2000_open_unit_async===
===ps2000_open_unit_async===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_open_unit_async'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_open_unit_async'''
|-
|-
| colspan="2" | This function opens a scope without blocking the calling thread.&nbsp;
| colspan="2" | This function opens a scope without blocking the calling thread.&nbsp;
Line 349: Line 332:


===ps2000_open_unit_progress===
===ps2000_open_unit_progress===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_open_unit_progress'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_open_unit_progress'''
|-
|-
| colspan="2" | This function checks on the progress of a request made to ps2000aOpenUnitAsync to open a scope.&nbsp;
| colspan="2" | This function checks on the progress of a request made to ps2000aOpenUnitAsync to open a scope.&nbsp;
Line 373: Line 356:


===ps2000_ready===
===ps2000_ready===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_ready'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_ready'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 392: Line 375:


===ps2000_run_block===
===ps2000_run_block===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_run_block'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_run_block'''
|-
|-
| colspan="2" | This function starts collecting data in block mode.&nbsp;
| colspan="2" | This function starts collecting data in block mode.&nbsp;
Line 431: Line 414:


===ps2000_set_channel===
===ps2000_set_channel===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_set_channel'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_set_channel'''
|-
|-
| colspan="2" | This function specifies whether an input channel is to be enabled, its input coupling type, voltage range, analog offset and bandwidth limit.&nbsp;
| colspan="2" | This function specifies whether an input channel is to be enabled, its input coupling type, voltage range, analog offset and bandwidth limit.&nbsp;
Line 470: Line 453:


===ps2000_set_sig_gen_built_in===
===ps2000_set_sig_gen_built_in===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_set_sig_gen_built_in'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_set_sig_gen_built_in'''
|-
|-
| colspan="2" |  sets up the signal generator to produce a signal from a list of built-in waveforms&nbsp;
| colspan="2" |  sets up the signal generator to produce a signal from a list of built-in waveforms&nbsp;
Line 534: Line 517:


===ps2000_set_trigger===
===ps2000_set_trigger===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_set_trigger'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_set_trigger'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
Line 578: Line 561:


===ps2000_stop===
===ps2000_stop===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ps2000_stop'''
| width="90%" class="mtx-class-macrohead" | '''ps2000_stop'''
|-
|-
| colspan="2" | 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.&nbsp;
| colspan="2" | 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.&nbsp;
Line 598: Line 581:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|}
|}

Latest revision as of 14:23, 13 July 2026

Author Matrix Ltd
Version 1.0
Category Test Equipment


PicoScope component

A set of functions designed for interacting with a 2000 series Pico scope via simulation.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_PS2000.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_PS2000.fcsx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

ps2000_close_unit

ps2000_close_unit
This function shuts down an oscilloscope. 
- INT Handle
The handle of the scope device to be closed 
- INT Return


ps2000_flash_led

ps2000_flash_led
This function flashes the LED on the front of the scope without blocking the calling thread.  
- INT handle
handle of the scope device 
- INT Return


ps2000_get_timebase

ps2000_get_timebase
Returns details associated with the selected timebase index 
- 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. 
- INT Return


ps2000_get_times_and_values

ps2000_get_times_and_values
 
- 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
 
- LONG Return


ps2000_get_unit_info

ps2000_get_unit_info
This function retrieves information about the specified oscilloscope. 
- INT Handle
the handle of the device 
- STRING info_string
unit information string 
- 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 
- INT Return


ps2000_get_values

ps2000_get_values
This function returns block-mode data, with or without downsampling. 
- 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
 
- LONG Return


ps2000_open_unit

ps2000_open_unit
Returns a handle to the opened unit Returns 0 if no unit found Returns -1 if unit failed to open 
- INT Return


ps2000_open_unit_async

ps2000_open_unit_async
This function opens a scope without blocking the calling thread. 
- INT Return


ps2000_open_unit_progress

ps2000_open_unit_progress
This function checks on the progress of a request made to ps2000aOpenUnitAsync to open a scope. 
- INT handle
 
- INT Progress
 
- INT Return


ps2000_ready

ps2000_ready
 
- INT Handle
 
- INT Return


ps2000_run_block

ps2000_run_block
This function starts collecting data in block mode. 
- INT handle
 
- LONG no_of_samples
 
- INT timebase
 
- INT oversample
 
- LONG time_indisposed_ms
 
- INT Return


ps2000_set_channel

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. 
- 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 
- INT Return


ps2000_set_sig_gen_built_in

ps2000_set_sig_gen_built_in
sets up the signal generator to produce a signal from a list of built-in waveforms 
- 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 
- INT Return


ps2000_set_trigger

ps2000_set_trigger
 
- INT handle
 
- INT source
 
- INT threshold
 
- INT direction
 
- INT delay
 
- INT auto_trigger_ms
 
- INT Return


ps2000_stop

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. 
- INT Handle
 
- INT Return


Property reference

Properties