Streaming and ps3000_stop freezes until cable is unplugged

Forum for discussing PicoScope (version 5)
Post Reply
Guest

Streaming and ps3000_stop freezes until cable is unplugged

Post by Guest »

Hi,

I'm using the ps3000 API to get some measurements from a 3204. But I have a problem when using the streaming mode and stopping it again. It then just freeze in the ps300_stop function, and ill have to plug the cable for it to continue. PicoScope 6 and Picolog works fine. It seems like I cant interrupt the streaming.

The smallest code i get it with. (C#)

short[] bufferA = new short[60000];
short[] bufferB = new short[60000];

PS3000 ps = new PS3000();
ps.Open();

ps.SetChannel(PS3000.Channel.ChannelA, true, PS3000.Coupling.DC, PS3000.Range.Range5V);
ps.SetEts(PS3000.EtsMode.Off, 0, 0);
ps.SetTrigger(PS3000.Channel.None, 0, PS3000.TriggerThresholdDirection.Rising, 0, 0);

ps.RunStreaming(30, 60000, 0);

Thread.Sleep(10000);

short numOverflows;
int numberOfValuesCaptured = ps.GetValues(bufferA, bufferB, null, null, out numOverflows, 60000);

ps.Stop(); // Freezes in this call

Any ideas what i must do to make it work?

Thanks!

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Post by Robin »

Hi

I'm not sure why that is causing problems.

Have you tried the C console example?

Robin
Attachments
PS3000con.c
(46.17 KiB) Downloaded 1214 times

Guest

Still :/

Post by Guest »

Hi Roben,

Thanks for taking your time to answer.

I've tried it and it does the same with the streaming mode. So it fail with both PS3000con.c and the C#.

When it fails I have to unplug the USB and remove the power cable from the pico and then put the power cable in again and then put the USB cable in again for it to work.

I've tried the 6.2.3 version, and looked if there was some new DLL in it. It was the same, so no win in that version either.

I've also tried it on a clean Windows XP, installed the drivers with the PicoScope 6.2.2 installation, plugging it in, and running the PS3000con. Then it freezes also when ps3000_stop is called.

Guest

Post by Guest »

Robin :-) Sorry

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Post by Robin »

that's OK :wink:

I'm trying to re-create the problem using the console example. When you run it and select 'S', what happens? Does it hang on the first call to ps3000_stop?

Guest

Post by Guest »

Hi.

It retrieves the measurements fine. Only when closing or stopping it fails.

I have tried it on three different computers: Two of them Windows XP (Lenovo Thinkpad T60 and a unknown) and one Windows 7 (Lenovo Thinkpad T60).

In Windows XP it is possible to call the ps3000_stop function after streaming and it returns to the menu. But.. when pushing X to exit and leave the memu loop, it freezes at ps3000_close_unit() instead.

In Windows 7 it already freezes at the ps3000_stop. So it get a little further on XP, but it will not allow the unit to be closed properly in any of them.

If I close the console and start it again, the pico is not correctly shut down and I have to reconnect the power and USB cable.

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Post by Robin »

Can you try this driver and let me know how you get on?

Thanks
Attachments
ps3000.zip
(318.63 KiB) Downloaded 966 times

Guest

Post by Guest »

Hi Robin,

Its working like a charm in Windows XP machines. Beautiful! Thanks :D :D

On Windows 7 it still hangs at the ps3000_stop command. Can I supply any information to help finding the cause?

Robin
Advanced User
Advanced User
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Post by Robin »

I'm surprised that the problem still occurs in Windows 7. I will give it a try.

silverwolf
Newbie
Posts: 1
Joined: Mon May 18, 2009 1:19 pm

Post by silverwolf »

Hi Robin,

Thanks.

The 3.6.4.7 behaves different than 3.6.4.6 in the ps3000_stop command.

The behaevior in 3.6.4.6 was when it was called, it kept using cpu cycles in the setAdvTriggerDelay function for 10 seconds and then the threads shut down. In the 3.6.4.7 version it stops imediately when ps3000_stop is called. But both don't return control to the program and shuts the picoscope properly down.

mueli
Newbie
Posts: 0
Joined: Fri May 25, 2012 9:16 am

Re: Streaming and ps3000_stop freezes until cable is unplugg

Post by mueli »

Hi!

I hope it is ok to enter this old thread. I am just trying to run the PS3000con.c example on Linux. I am using the driver release 3.6.2.0 Linux provided on the homepage. I do observe the described behavior, that the ps3000_stop() does not return to the console program. The device does not get stopped and I do have to plug USB off and on to get access to it again.

Any help would be appreciated! Greets,

Michael

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

Re: Streaming and ps3000_stop freezes until cable is unplugg

Post by Martyn »

Have you tried the later version from http://www.picotech.com/software.html Just select your particular model at Step 1 and the Linux Driver at Step 2
Martyn
Technical Support Manager

Post Reply