Test and Measurement Forum

5444B - Stream freezes

Post your MATLAB discussions here

5444B - Stream freezes

Postby KJagielski » Fri Mar 16, 2018 4:06 pm

Hello,

I use Windows 7 64 bit, Matlab R2017b, a Picoscope 5444B and stream data from 3 channels with 1 MS/s each.
The problem is that after a time of about 6-7 minutes the stream freezes / does not deliver any more data.

I built my script using the PS5000A_ID_Streaming_Example.m. During recording, I save the data to the hard disk and erase it from memory. Even if I do not read the data from the buffer, no new data is delivered after 6-7 minutes. This problem doesn't occure when streaming at lower rates like 100 kS/s. The parameters I use to create the buffers and make the picoscope ready to start:
sampleCount = 1e7;
set(handles.ps5000a.DeviceObj, 'streamingInterval', 1e6);
set(handles.ps5000a.DeviceObj, 'numPostTriggerSamples', 3600*1e6); % I press "Stop" manually within an hour
downSampleRatio = 1;
finalBufferLength = round(1.5* 3* sampleCount);

What I have observed is that the memory usage is constantly increasing during recording (see screenshot). I can only release it again as soon as I prepare the picoscope again for a streaming mode.

I hope you can help me or give me hints where the problem might lie. I will be happy to provide further information if required.

Many thanks and kind regards

screenshot of windows task-manager: https://prnt.sc/is3yma
KJagielski
Newbie
 
Posts: 0
Joined: Tue Mar 10, 2015 4:05 pm

Re: 5444B - Stream freezes

Postby Hitesh » Tue Mar 20, 2018 9:39 am

Hi KJagielski,

Do you see the same effect if you run the PicoScope 6.12 and/or PicoScope 6.13 Beta software with the same/similar setup?

Is MATLAB still responsive when the data collection freezes? If so, please use the memory function to see the
current memory usage.

If you don't see the same effect in PicoScope 6, it may be something to do with the way arrays are being managed in MATLAB.

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2714
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

Re: 5444B - Stream freezes

Postby KJagielski » Tue Mar 27, 2018 4:21 pm

Hi Hitech,

when I run the PicoScope 6.12, I do not see a problem at all, but it does not record for such a long time when at 1MS/s (The problem in MATLAB occurs after several minutes).

MATLAB is still responsive (while busy, I can pause to enter commands) and memory returns:
Maximum possible array: 13682 MB (1.435e+10 bytes) *
Memory available for all arrays: 13682 MB (1.435e+10 bytes) *
Memory used by MATLAB: 5374 MB (5.636e+09 bytes)
Physical Memory (RAM): 12206 MB (1.280e+10 bytes)

[u,v]=memory;
v.PhysicalMemory.Available returns 2.1419e+09 bytes

Further, I found out that when no data is passed into the buffer anymore, the picoscope returns PicoConstants.FALSE when called invoke(handles.ps5000a.DeviceObj, 'isReady')

Can this still be an array managing problem with MATLAB, when picoscope returns "not ready"?

PS: I found out that at a rate of 1MS/s the data collection freezes at exactly 382,788,160 collected data samples.

Thank you and kind regards
KJagielski
Newbie
 
Posts: 0
Joined: Tue Mar 10, 2015 4:05 pm

Re: 5444B - Stream freezes

Postby Hitesh » Wed Mar 28, 2018 10:19 am

Hi KJagielski,

Thanks for the information.

Could you please e-mail your .m script to support@picotech.com and we will investigate further.

Regards,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2714
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire


Return to MATLAB

Who is online

Users browsing this forum: No registered users and 1 guest