Test and Measurement Forum

Returned value is maximum negative value -32768

Post your C and C++ discussions here

Returned value is maximum negative value -32768

Postby csaether » Mon May 10, 2010 11:30 pm

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

Postby csaether » Tue May 11, 2010 1:42 am

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.
csaether
Newbie
 
Posts: 0
Joined: Tue Nov 24, 2009 11:27 pm

Re: Returned value is maximum negative value -32768

Postby Robin » Tue May 11, 2010 11:58 am

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

Re: Returned value is maximum negative value -32768

Postby csaether » Tue May 11, 2010 5:08 pm

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.
csaether
Newbie
 
Posts: 0
Joined: Tue Nov 24, 2009 11:27 pm


Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests