continuous sampling

Which product is right for your exact requirements
Post Reply
rogerd
Active User
Active User
Posts: 27
Joined: Tue Nov 07, 2006 6:32 am

continuous sampling

Post by rogerd »

Last summer Sarah said concerning continuous sampling with a new USB driver that it would work with a 3424.

I have some questions about this.

(1) Can one initiate recording on two channels by triggering on a third channel?

(2) How does one stop recording?

(3) What are the sampling rate limitations apart from the computer?

(4) What is the format of the recorded data when one is doing multi-channel recording?

(5) Can this data be viewed with Picoscope once it is stored or while it is still in memory?

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

Hi and thank you for your post.

I have forwarded your query to one of our software engineers please have a look at the answers below:

Q) (1) Can one initiate recording on two channels by triggering on a third channel?
A) It records on the channel that you trigger on. However, there is nothing to stop you ignoring the unwanted data.

Q) (2) How does one stop recording?
A) Call the stop function in the driver, it's documented in the driver help file.

Q) (3) What are the sampling rate limitations apart from the computer?
A) You can achieve 1 microsecond streaming can be set for all four channels, however this is very much dependant on your PC and any overheads.

Q) (4) What is the format of the recorded data when one is doing multi-channel recording?
A) There is no format as such, its just binary data (arrays of 16bit signed values ... 'short' in C/C++). Again, see the driver help file for the full API documentation.

Q) (5) Can this data be viewed with Picoscope once it is stored or while it is still in memory?
A) No, the PicoScope software has its own file formats and are merely built on top of the PS3000 driver. If you write your own application on top of the PS3000 driver, it will share nothing in common with the PicoScope sofware. To view data in PSW5.x, the data must be captured with PSW5.x


Hope this helps
Ziko

Technical Specialist

rogerd
Active User
Active User
Posts: 27
Joined: Tue Nov 07, 2006 6:32 am

continuous sampling

Post by rogerd »

Thank you for your reply.

Where can I find information on the PS3000 driver?

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Post by ziko »

Hi what kind of information are you looking for?
Ziko

Technical Specialist

rogerd
Active User
Active User
Posts: 27
Joined: Tue Nov 07, 2006 6:32 am

continuous sampling

Post by rogerd »

I'm looking for information on the data format for continuous sampling, i.e. from a previous post:

Q) (4) What is the format of the recorded data when one is doing multi-channel recording?
A) There is no format as such, its just binary data (arrays of 16bit signed values ... 'short' in C/C++). Again, see the driver help file for the full API documentation.

Binary data is OK but how would it be arranged if you have more than one channel? How would one communicate with the driver in C? Where is the driver help file?

User avatar
markspencer
Site Admin
Site Admin
Posts: 598
Joined: Wed May 07, 2003 9:45 am

Post by markspencer »

Hi,

Thank you for your question, the data is returned in an array for each channel. The function that is used to collect the data in fast streaming is:

void my_get_overview_buffers (
short **overviewBuffers,
short overflow,
unsigned long triggeredAt,
short triggered,
short auto_stop,
unsigned long nValues )

The above function is used while the device is streaming, the overviewBuffers parameter is a pointer of pointers (two dimensional array), the data is recieved in these buffers as a maximim array and minimum array for each channel. Therefore for the PS3423 and PS3424 you would have 8 arrays, as the device has 4 channels each, if the channel is not in use then a NULL pointer would be returned. If the device is a 2 channel device then you would have 8 arrays but only the first four arrays are used, the remainder will always be NULL.

When the device has stopped streaming there are two function calls to retrieve the data from the driver. These are different in one major aspect the first is for collecting data with an aggregation value, and as you can see there are 8 buffers, a max and min for each channel, again if the device is 2 channels, the Channel C and D buffers will be ignored. The data is retrieved by passing an array to each of the samples you want back.

unsigned long ps3000_get_streaming_values (
short handle,
double *start_time,
short *pbuffer_a_max,
short *pbuffer_a_min,
short *pbuffer_b_max,
short *pbuffer_b_min,
short *pbuffer_c_max,
short *pbuffer_c_min,
short *pbuffer_d_max,
short *pbuffer_d_min,
short *overflow,
unsigned long *triggerAt,
short *triggered,
unsigned long no_of_values,
unsigned long noOfSamplesPerAggregate )

or

The alternate it to use this function that retrieves data with no aggregation and therefore only four buffer (arrays) are required.

unsigned long ps3000_get_streaming_values_no_aggregation (

short handle,
double *start_time,
short *pbuffer_a,
short *pbuffer_b,
short *pbuffer_c,
short *pbuffer_d,
short *overflow,
unsigned long *triggerAt,
short *trigger,
unsigned long no_of_values )

The full description of these and the other api calls are available in the user PicoScope3000 user manual, under
Technical Reference | Programming with the PicoScope3000 Series | Functions.

If you need to down load it

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

I hope this assists you.

Best regards,
Regards,

Mark Spencer

Post Reply