ps3000_get_values - overflow flags mismatch

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
viktor
User
User


Joined: 09 Jul 2007
Posts: 2

PostPosted: Mon Jul 09, 2007 8:43 pm    Post subject: ps3000_get_values - overflow flags mismatch Reply with quote

Hi,

I am adding ps3223 support to our scope application. The software uses block mode and ps3000_get_values. Single channel A is set and has voltage overflow on it. After ps3000_get_values returns, overflow output parameter is set to 2. This does not match ps3000_get_values specification that defines Bit 0 as an overflow flag for channel A. According to the specification the overflow parameter should be 1. All other channels are also shifted by one bit:
Bit1 -> Channel A
Bit2 -> Channel B
Bit3 -> Channel C
Bit4 -> Channel D
The same problem exists on ps3000_get_times_and_values.

Did anybody face the same issue?


Code:
Code:

   short nHandle;
   long nTime;
   short nReady;
   short nOverflow;
   short aBuffer[1000];
   
   // Applied signal: 1 KHz DC, +-10V.
   nHandle = ps3000_open_unit();
   ps3000_set_channel(nHandle, PS3000_CHANNEL_A, 1, 0, 2);
   ps3000_set_channel(nHandle, PS3000_CHANNEL_B, 0, 0, 2);
   ps3000_set_trigger(nHandle, PS3000_NONE, 0, 0, 0, 0);
   ps3000_run_block(nHandle, 1000, 6, 1, &nTime);
   while ((nReady = ps3000_ready(nHandle)) == 0);
   ps3000_stop(nHandle);
   if (nReady > 0)
   {
      ps3000_get_values(nHandle, aBuffer, NULL, NULL, NULL, &nOverflow, 1000);
      // nOverflow is 2, must be 1 according to PS3000 specification.
   }
   ps3000_close_unit(nHandle);
Back to top
markB
Site Admin
Site Admin


Joined: 27 Mar 2007
Posts: 80
Location: Cambridgeshire,UK

PostPosted: Thu Jul 19, 2007 10:29 am    Post subject: Reply with quote

You are quite correct. The overflow is being reported wrong. I've reported a bug and the fix should go into upcoming 5.17.x release.

To get you going, I've attached a dll that fixes the problem.



ps3000.zip
 Description:

Download
 Filename:  ps3000.zip
 Filesize:  241.71 KB
 Downloaded:  124 Time(s)

Back to top
viktor
User
User


Joined: 09 Jul 2007
Posts: 2

PostPosted: Fri Jul 20, 2007 9:16 pm    Post subject: Reply with quote

Mark,

Thank you for the reply and the updated ps3000.dll.

Unfortunately, the attached ps3000.dll (v 3.3.3.0) does not work for me. ps3000_ready in the example above never returns 1. I will wait for the official release.

The workaround with shifting by one bit seems to work fine but requires installation of ps3000.dll to the application target folder. Please keep in mind that some developers may have implemented this workaround as well. If they install ps3000.dll v 3.2.4.0 to System32 folder and another application puts newer fixed ps3000.dll to System32, the first application will not be able to detect overflow properly.
Back to top
ziko
Site Admin
Site Admin


Joined: 01 Dec 2006
Posts: 600
Location: St Neots

PostPosted: Wed Aug 08, 2007 10:41 am    Post subject: Reply with quote

Hi the newest release of the software is out now, 5.17.1, please try this to see if it resolves your problem.

http://www.picotech.com/software.html

Kind regards

Ziko
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group