Test and Measurement Forum

Streaming and ps3000_stop freezes until cable is unplugged

Forum for discussing PicoScope (version 5)

Streaming and ps3000_stop freezes until cable is unplugged

Postby Guest » Sun May 17, 2009 1:29 pm

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

Postby Robin » Mon May 18, 2009 9:33 am

Hi

I'm not sure why that is causing problems.

Have you tried the C console example?

Robin
Attachments
PS3000con.c
(47.77 KiB) Downloaded 367 times
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Still :/

Postby Guest » Mon May 18, 2009 12:03 pm

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
 

Postby Guest » Mon May 18, 2009 12:21 pm

Robin :-) Sorry
Guest
 

Postby Robin » Mon May 18, 2009 12:25 pm

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?
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby Guest » Mon May 18, 2009 1:02 pm

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.
Guest
 

Postby Robin » Mon May 18, 2009 3:30 pm

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

Thanks
Attachments
ps3000.zip
(318.63 KiB) Downloaded 330 times
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby Guest » Mon May 18, 2009 5:03 pm

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?
Guest
 

Postby Robin » Tue May 19, 2009 8:55 am

I'm surprised that the problem still occurs in Windows 7. I will give it a try.
Robin
Zen Master
Zen Master
 
Posts: 558
Joined: Fri Sep 19, 2008 10:17 am

Postby silverwolf » Tue May 19, 2009 11:19 am

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.
silverwolf
Newbie
 
Posts: 1
Joined: Mon May 18, 2009 1:19 pm

Re: Streaming and ps3000_stop freezes until cable is unplugg

Postby mueli » Fri May 25, 2012 9:21 am

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
mueli
Newbie
 
Posts: 0
Joined: Fri May 25, 2012 9:16 am

Re: Streaming and ps3000_stop freezes until cable is unplugg

Postby Martyn » Mon May 28, 2012 10:42 am

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


Return to PicoScope 5

Who is online

Users browsing this forum: No registered users and 0 guests