Trouble with Matlab and Picoscope 4224

Post general discussions on using our drivers to write your own software here
Post Reply
libussa

Trouble with Matlab and Picoscope 4224

Post by libussa »

Hello,
I'm using the picoscope 4224 with Matlab 2011. I wrote some code to use the scope in trigger block mode. It all works very well. To circumvent the problem with the callback and Matlab, I'm using the IsReady function.

My problem is This : sometimes, Matlab gives me a segfault. Sometimes it's when I'm openning the scope ; no trouble there, I just do it again, and it works. But I'm using the scope to do long-time surveillance (several days), and the program crashes during the acquisition, waiting for the trigger...
A friend told me thad the IsReady function polling the driver could be the source of the problem, as it is kind of "stresfull" for the driver, compared to a callback...What do you think ? Do you think it's worth it to rewrite my code to use callbacks ?
Or do you have an other idea for my problem ?

Thanks in advance for your responses !

Martyn
Site Admin
Site Admin
Posts: 4499
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Trouble with Matlab and Picoscope 4224

Post by Martyn »

It would depend upon how frequently you are calling the IsReady function when you are waiting for the trigger, so I would suggest that you look at your code and adjust the frequency of this call or consider rewriting the code to use callbacks.
Martyn
Technical Support Manager

Post Reply