Test and Measurement Forum

Trouble with Matlab and Picoscope 4224

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

Trouble with Matlab and Picoscope 4224

Postby libussa » Thu Jul 28, 2011 8:42 am

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 !
libussa
 

Re: Trouble with Matlab and Picoscope 4224

Postby Martyn » Fri Jul 29, 2011 10:36 am

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2285
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests