Returned value is maximum negative value -32768

Post your C and C++ discussions here
Post Reply
csaether
Newbie
Posts: 0
Joined: Tue Nov 24, 2009 11:27 pm

Returned value is maximum negative value -32768

Post by csaether »

I'm using fast streaming mode for a 3224 on an XP system.

I am not using triggering or autostop, as it wants to run continuously and analyze the data stream in nearly real time. Aggregation is set to 2, on the idea that you're returning a min and max anyway, so might as well use both of them.

With an overview buffer size of 300,000 and a max_samples size of 64,000 (or 24,000, it did not seem to matter) everything is dandy with a sample_interval of 2300 nanoseconds. My code runs in a loop sleeping 150 milliseconds between each call to return more data. It runs indefinitely (at least 10 minutes just now) with no problems.

However, at a sample_interval time of 2050, it runs for about 10 seconds, at which point both the min and max values for both channels comes back with values of -32768.

I do not see this value documented anywhere. I am guessing it means something, and not a good thing.

Can you tell me what it means?

csaether
Newbie
Posts: 0
Joined: Tue Nov 24, 2009 11:27 pm

Re: Returned value is maximum negative value -32768

Post by csaether »

The status value of ps3000_get_streaming_last_values is success, as it ps3000_overview_buffer_status in the call where bogus (minus 32768) values are returned.

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

Re: Returned value is maximum negative value -32768

Post by Robin »

Hi

This appears to have been omitted from the manual. It is defined in the header (ps3000.h) though:

#define PS3000_LOST_DATA -32768

This suggests that data can not be transferred to the PC at a high enough rate.

Robin

csaether
Newbie
Posts: 0
Joined: Tue Nov 24, 2009 11:27 pm

Re: Returned value is maximum negative value -32768

Post by csaether »

Thanks. The PC is one which is only operating at USB 1 speeds, which seems to be the problem. Using one running USB 2 it will go at least a couple of times faster without problem.

Post Reply