Test and Measurement Forum

ps3000_get_values - overflow flags mismatch

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

ps3000_get_values - overflow flags mismatch

Postby viktor » Mon Jul 09, 2007 8:43 pm


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: Select all
   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);
   if (nReady > 0)
      ps3000_get_values(nHandle, aBuffer, NULL, NULL, NULL, &nOverflow, 1000);
      // nOverflow is 2, must be 1 according to PS3000 specification.
Posts: 2
Joined: Mon Jul 09, 2007 8:14 pm

Postby markB » Thu Jul 19, 2007 10:29 am

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.
(241.71 KiB) Downloaded 314 times

Site Admin
Site Admin
Posts: 83
Joined: Tue Mar 27, 2007 9:43 am
Location: Cambridgeshire,UK

Postby viktor » Fri Jul 20, 2007 9:16 pm


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

Unfortunately, the attached ps3000.dll (v 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 to System32 folder and another application puts newer fixed ps3000.dll to System32, the first application will not be able to detect overflow properly.
Posts: 2
Joined: Mon Jul 09, 2007 8:14 pm

Postby ziko » Wed Aug 08, 2007 10:41 am

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


Kind regards


Technical Specialist
Zen Master
Zen Master
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests