Acquire Signals from an Oscilloscope Using the PicoScope MATLAB Instrument Driver
This example shows how to use a generic MATLAB Device Driver (MDD) with the
icdevice function to acquire and visualize analog voltage
signals from a PicoScope device.
Requirements
Instrument Control Toolbox™
PicoScope Support Toolbox, available for download from MATLAB File Exchange.
A PicoScope oscilloscope, among the list of supported models at PicoScope Support from Instrument Control Toolbox
Set Up Software
Find your PicoScope model and download the zip folder from https://github.com/picotech/picosdk-c-wrappers.git.

Find your platform and download the zip folder from https://github.com/picotech/picosdk-c-wrappers-binaries.

Download and install the PicoScope 2000 Series or PicoScope 2204A series software from Pico Technology Downloads. Choose according to your instrument and system architecture. This figure shows the selection for the recommended PicoScope 2204A software on Windows®.

This is a list of files expected after all the installation is completed.

Add all the installed PicoScope related files to the MATLAB® path.
Connect Device and Load Configuration
Connect your PicoScope device to your computer.
Run the PS2000Config script in MATLAB to set up the hardware.
PS2000Config; % Loads trigger and channel settingsConnect App to the PicoScope
Open the Instrument Explorer app from the Apps tab on the
MATLAB toolstrip. Alternatively, you can open the app by executing
instrumentExplorer at the MATLAB command prompt.
Click Configure New Instrument to manually configure the PicoScope. The PicoScope driver should now be available on the MATLAB path and in the app driver list. Click Driver and select your driver from the drop-down.

Verify a connection to the device by clicking Confirm Parameters.
Configure Device Settings
Navigate to Functions > Parent > ps2000SetChannel. Then enter the following values
channel: 0enabled: 1dc: 1range: 6
Click Execute.

Similarly, enable the second channel with values
channel: 1enabled: 1dc: 1range: 7
Set Acquisition Parameters
Set the following parameter by entering the specified values and clicking Execute.
Navigate to the node Functions > Blocks > setBlockIntervalUs, and set the following parameter values:
timeIntervalUs: 100
Navigate to Properties > parent > numberOfSamples, and set the following parameter values:
Value: 2048
Navigate to Select Properties > trigger > delay, and set the following parameter values:
Value: 50
Navigate to Select Properties > trigger > autoTriggerMs, and set the following parameter values:
Value: 1000
Navigate to Functions > trigger > setSimpleTrigger, and set the following parameter values:
source: 0thresholdMv: 500direction: 2
Acquire Block Data
Navigate to the node Functions > block > getBlockData and click Execute.
Navigate to the node Functions > parent > ps2000Stop and click Execute.
View Activity Log
The Activity Log shows all the property and function actions.

Plot the Acquired Signal
To plot an analog signal, select a value in the Activity Log and click Plot Data in the toolstrip.
