Test and Measurement Forum

Hang on data read with some timebases on Picoscope 6402A

Post your C and C++ discussions here

Hang on data read with some timebases on Picoscope 6402A

Postby gnyfin » Thu Aug 01, 2013 9:09 pm

Hi everyone!

Facts:
Windows 7 64bit
Microsoft Visual Studio 2010 Ultimate
Picoscope 6402A
latest Software Development Kit R10.5.0.19 / C# example
SineWave 100Hz, 1V peak at Chan1


I am new to Picoscope so I checked out the C# example given in the SDK package. I want to use the CollectBlockImmediate(), because it fits for my application.

So the C# example is running and for certain timebases (everything below 10000) it is working properly as I espected. For much higher values the console application freezes @PS6000ConsoleExample.cs (line 218) see below

Code: Select all
     
while (!_ready)
{
        Thread.Sleep(100);



Waiting for data... Press a key to abort



It seems there was a similar problem in this thread topic6823.html so I also tried the compiled *.exe given by Chris, but it hangs at the same spot (it also works with low timebase-values).

Waiting for trigger... Press a key to abort


Regards,

Mark
gnyfin
Newbie
 
Posts: 0
Joined: Thu Aug 01, 2013 8:42 pm

Re: Hang on data read with some timebases on Picoscope 6402A

Postby Martyn » Wed Aug 07, 2013 8:52 am

Have you made any changes to the code, or compiled as supplied ?

What value is returned in the timeIndisposedMs value from the RunBlock call ?
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2339
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Hang on data read with some timebases on Picoscope 6402A

Postby gnyfin » Tue Aug 13, 2013 12:22 pm

Martyn wrote:Have you made any changes to the code, or compiled as supplied ?


Compiled as supplied.



Martyn wrote: What value is returned in the timeIndisposedMs value from the RunBlock call ?

Surprisingly now it doesn´t work at all.

If I start a immediate block measurement with the default timebase=2 it works properly.

Changing the timebase to 3(and higher) causes a (endless)loop at

Code: Select all
      while (Imports.GetTimebase(_handle, _timebase, (int)sampleCount, out timeInterval, _oversample, out maxSamples, 0) != 0)
      {
        _timebase++;
      }


I can only pass through this loop setting a breakpoint at Visual Studio leading to a "data collection aborted"
gnyfin
Newbie
 
Posts: 0
Joined: Thu Aug 01, 2013 8:42 pm

Re: Hang on data read with some timebases on Picoscope 6402A

Postby Martyn » Wed Aug 21, 2013 12:22 pm

What other values are you passing into this function, and are you running with 1 or more channels enabled.
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2339
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests