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

From Flowcode Help
Jump to navigationJump to search
Line 16: Line 16:
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 22: Line 24:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 519: Line 523:
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -  
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -  
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CommsBaud'''
 
|-
 
| colspan="2" | Sets the Baud rate of the alt communications channel 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Baud
 
|-
 
| colspan="2" | Range: 0-7 : 0=1200 / 7=115200 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDOptions'''
 
|-
 
| colspan="2" | Controls some of the LCD options 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Foreground
 
|-
 
| colspan="2" | Range: 0-1 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Background
 
|-
 
| colspan="2" | Range: 0-1 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Transparent
 
|-
 
| colspan="2" | Range: 0-1 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDVerbose'''
 
|-
 
| colspan="2" | Controls the Verbose mode.  When enabled the LCD automatically displays an account of the incoming API commands and parameters. When switched off the LCD is free for the user to control as required. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Mode
 
|-
 
| colspan="2" | Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadDigitalInput'''
 
|-
 
| colspan="2" | Reads a single digital input. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMConfig'''
 
|-
 
| colspan="2" | Sets the PWM configuration. Channel = 0 - 1 : 0 = EN_AB, A, B / 1 = EN_CD, C, D Period = 0 - 65535 Scaler = 0 - 3 :  0=1:1 1=1:8 2=1:64 3=1:256 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" | Range 0-1 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Period
 
|-
 
| colspan="2" | Range: 0-65535 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Scaler
 
|-
 
| colspan="2" | Range: 0-3 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable'''
 
|-
 
| colspan="2" | Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | EnableMask
 
|-
 
| colspan="2" | Range 0-63 or 0b00000 to 0b111111 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMDuty'''
 
|-
 
| colspan="2" | Sets a single PWM channel duty. Channel = 0 - 5 : 0=EN_AB, 1=A, 2=B, 3=C, 4=D, 5=EN_CD Duty = 0 - 65535 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" | Range 0-5 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Duty
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDCursor'''
 
|-
 
| colspan="2" | Sets the cursor position for the MIAC display 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | X
 
|-
 
| colspan="2" | Range: 0-21 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Y
 
|-
 
| colspan="2" | Range: 0-4 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteTran'''
 
|-
 
| colspan="2" | Allows a single transistor output to be switched on or off. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" | Range 1-4 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Value
 
|-
 
| colspan="2" | 0 = Off, 1 = On 
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDClear'''
 
|-
 
| colspan="2" | Clears the MIAC display 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LCDClear'''
 
|-
 
| colspan="2" | Clears the LCD 
 
|-
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}

Revision as of 11:05, 17 November 2021

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.

Detailed description

No detailed description exists yet for this component

Examples

An example project showing the capabilities of the Velleman K8055D board combined with a Pico Technology series 2 scope.

FC6 Icon.png Velleman and Picoscope Demo

Downloadable macro reference

Fc9-comp-macro.png ps2000_get_timebase
Returns details associated with the selected timebase index 
[[File:]] - Handle
the handle of the required device. 
[[File:]] - timebase
The ps2000a API allows you to select any of 2 32 different timebases based on a maximum sampling rate of 1 GS/s. 
[[File:]] - no_of_samples
number of samples required 
[[File:]] - time_interval
time interval between readings at the selected timebase. Use NULL if not required. 
[[File:]] - time_units
 
[[File:]] - oversample
not used. 
[[File:]] - max_samples
on exit, the maximum number of samples available. 
[[File:]] - Return


Fc9-comp-macro.png ps2000_open_unit_progress
This function checks on the progress of a request made to ps2000aOpenUnitAsync to open a scope. 
[[File:]] - handle
 
[[File:]] - Progress
 
[[File:]] - Return


Fc9-comp-macro.png ps2000_flash_led
This function flashes the LED on the front of the scope without blocking the calling thread.  
[[File:]] - handle
handle of the scope device 
[[File:]] - Return


Fc9-comp-macro.png 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. 
[[File:]] - Handle
 
[[File:]] - Return


Fc9-comp-macro.png ps2000_get_unit_info
This function retrieves information about the specified oscilloscope. 
[[File:]] - Handle
the handle of the device 
Fc9-string-icon.png - STRING info_string
unit information string 
[[File:]] - string_length
the maximum number of chars in the string 
[[File:]] - 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 
[[File:]] - Return


Fc9-comp-macro.png 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. 
[[File:]] - handle
Handle of the device 
[[File:]] - channel
the channel to be configured. The values are: 0=ChanA / 1=ChanB 
[[File:]] - enabled
whether or not to enable the channel. The values are: 0=Disable / 1=Enable 
[[File:]] - dc
the impedance and coupling type. Values: 0=AC / 1=DC 
[[File:]] - range
the input voltage range: 0=50mV / 1=100mV / 2=200mV / 3=500mV / 4=1V / 5=2V / 6=5V / 7=10V / 8=20V 
[[File:]] - Return


Fc9-comp-macro.png ps2000_get_times_and_values
 
[[File:]] - Handle
 
[[File:]] - times
 
[[File:]] - buffer_a
 
[[File:]] - buffer_b
 
[[File:]] - buffer_c
 
[[File:]] - buffer_d
 
[[File:]] - overflow
 
[[File:]] - time_units
 
[[File:]] - no_of_samples
 
[[File:]] - Return


Fc9-comp-macro.png ps2000_set_trigger
 
[[File:]] - handle
 
[[File:]] - source
 
[[File:]] - threshold
 
[[File:]] - direction
 
[[File:]] - delay
 
[[File:]] - auto_trigger_ms
 
[[File:]] - Return


Fc9-comp-macro.png ps2000_set_sig_gen_built_in
sets up the signal generator to produce a signal from a list of built-in waveforms 
[[File:]] - Handle
Handle to the device 
[[File:]] - Offset_uV
the voltage offset, in microvolts, to be applied to the waveform 
Fc9-u32-icon.png - ULONG pk2pk_uV
the peak-to-peak voltage, in microvolts, of the waveform 
[[File:]] - 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 
[[File:]] - startFrequency
the frequency that the signal generator will initially produce 
[[File:]] - stopFrequency
the frequency at which the sweep reverses direction or returns to initial 
[[File:]] - increment
the amount of frequency increase or decrease in sweep mode 
[[File:]] - dwellTime
the time for which the sweep stays at each frequency, in seconds 
[[File:]] - sweepType
whether the frequency will sweep from startFrequency to stopFrequency. 0=Up, 1=Down, 2=UpDown, 3=DownUp 
Fc9-u32-icon.png - ULONG sweeps
produce number of cycles specified by shots 
[[File:]] - Return


Fc9-comp-macro.png ps2000_close_unit
This function shuts down an oscilloscope. 
[[File:]] - Handle
The handle of the scope device to be closed 
[[File:]] - Return


Fc9-comp-macro.png ps2000_run_block
This function starts collecting data in block mode. 
[[File:]] - handle
 
[[File:]] - no_of_samples
 
[[File:]] - timebase
 
[[File:]] - oversample
 
[[File:]] - time_indisposed_ms
 
[[File:]] - Return


Fc9-comp-macro.png ps2000_get_values
This function returns block-mode data, with or without downsampling. 
[[File:]] - Handle
the handle of the required device. 
[[File:]] - buffer_a
Start point for data collection 
[[File:]] - buffer_b
Number of samples 
[[File:]] - buffer_c
Down sample ratio 
[[File:]] - buffer_d
Down sample mode : 0=None / 1=Aggregate / 2=Decimate / 4=Average 
[[File:]] - overflow
Flags to indicate if an overflow has occurred 
[[File:]] - no_of_samples
 
[[File:]] - Return


Fc9-comp-macro.png ps2000_ready
 
[[File:]] - Handle
 
[[File:]] - Return


Fc9-comp-macro.png ps2000_open_unit_async
This function opens a scope without blocking the calling thread. 
[[File:]] - Return


Fc9-comp-macro.png ps2000_open_unit
Returns a handle to the opened unit Returns 0 if no unit found Returns -1 if unit failed to open 
[[File:]] - Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations