Use PicoScope 4225 as DAq

Post your MATLAB discussions here
Post Reply
MoJou
Newbie
Posts: 0
Joined: Fri Jan 29, 2016 10:25 am

Use PicoScope 4225 as DAq

Post by MoJou »

Hello,

is it possible to use the PicoScope 4225 as DAq in combination with Matlab? I try to modify the PS400A_ID_Streaming_Example.m where i am limited to 2M Samples. My attemp is to Stream the data and copy it to my HDD using sprintf. The Problem is that I would have to clear the Buffer while measuring. Is this possible? (Actually the measurement stops 'AutoStop: TRUE - exiting loop.' due to collecting 2M Samples.)


Greedings

Hitesh

Re: Use PicoScope 4225 as DAq

Post by Hitesh »

Ho MoJou,

It is possible to use the PicoScope 4225 as a data acquisition device through MATLAB.

The example is designed to show how to setup the device and collect data in streaming mode without the use of a trigger, then stop when the required number of samples has been collected.

You will need to adapt the code for your purposes e.g. set the Instrument Driver Streaming object's autoStop property to false (0) to continuously collect data but ensure that you copy the data from the application buffers to where it needs to be stored/processed.

Regards,

MoJou
Newbie
Posts: 0
Joined: Fri Jan 29, 2016 10:25 am

Re: Use PicoScope 4225 as DAq

Post by MoJou »

Hello Hitesh,

i tried to set

Code: Select all

...
ps4000aDeviceObj = icdevice('picotech_ps4000a_generic', ''); 
ps4000aDeviceObj.Streaming.autoStop=0;
...

after that I checked the value and load the driver.

Code: Select all

...
connect(ps4000aDeviceObj);
...
The terminal shows up

Code: Select all

...
Default Streaming mode parameters:-

Streaming interval: 1.00e-06 s
Streaming auto stop: 1
...
after collecting 20 M samples the program stops.

Do i have to use any special set command?

Regards

MoJou
Newbie
Posts: 0
Joined: Fri Jan 29, 2016 10:25 am

Re: Use PicoScope 4225 as DAq

Post by MoJou »

Finally i set

Code: Select all

...
set(streamingGroupObj, 'streamingInterval', 100e-9);
set(streamingGroupObj, 'autoStop', 0);
...
now it works!. But at the moment i am not 100 % sure if the measurements are completely continous or if there are lags between the taken measurements. Have you got any hint?


Regards

Hitesh

Re: Use PicoScope 4225 as DAq

Post by Hitesh »

Hi MoJou,

Good to see that you found that the set() function must be used to change Instrument Driver device and group object properties prior to data collection.

The data should be continuous so long as you are polling the driver regularly using the 'GetStreamingLatestValues()' and 'IsReady()' functions.

One way to check this is to use a slow signal e.g. a sine or ramp wave at 1Hz and look for any discontinuities.

Hope this helps,

Post Reply