Test and Measurement Forum

How to set up sample interval to 60 sec. in comp. streaming

Post your C and C++ discussions here

How to set up sample interval to 60 sec. in comp. streaming

Postby Zoran G. » Mon Jun 02, 2008 1:50 pm


I 'am using the Picoscope 3424 at my work to measure the battery voltage.
I have tried to modify some of the sample code written in C and it works fine.
But I have a problem with changing the sample interval to 60 seconds.

Here is the code which I have changed but I can only change it to up to 3 seconds.

/* Collect data at 10ms intervals
* Max BUFFER_SIZE points on each call
* (buffer must be big enough for max time between calls
* Start it collecting,
* then wait for trigger event
*/ //1000 = 1S
ok = ps3000_run_streaming ( unitOpened.handle, 5000, 60000, 0 );
printf ( "OK: %d\n", ok );

/* From here on, we can get data whenever we want...
block_no = 0;

My log file looks like this, but it is suppose to go 5 seconds between the samples.

4311 ,15:31:48
4301 ,15:31:49
4304 ,15:31:51
4304 ,15:31:53
4304 ,15:31:54

I hope that somebody have a suggestion on how to solve this problem.

Thanks in advance.
Zoran G.
Posts: 1
Joined: Mon Jun 02, 2008 1:37 pm
Location: Copenhagen

Return to C and C++

Who is online

Users browsing this forum: No registered users and 0 guests