23.11.2014 Views

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

CompuScope SDK Manua.. - Egmont Instruments

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

gage_acquire_average<br />

Syntax<br />

C:<br />

int32 GAGEAPI gage_acquire_average (int16 channel, int32 nsamples, int32 naverages, int16 sum,<br />

int32 far *avg_buffer, void far *data_buffer,<br />

int32 data_buffer_size, int32 timeout);<br />

Visual BASIC:<br />

Function gage_acquire_average (ByVal channel As Integer, ByVal nsamples As Long,<br />

ByVal naverages As Long, ByVal sum As Integer,<br />

avg_buffer As Long, data_buffer As Any,<br />

data_buffer_size As Long, timeout As Long) As Long<br />

Remarks<br />

gage_acquire_capture finds the average of a number of acquisitions. This routine does the entire capture<br />

and transfer of data internally and does not return until either all captures are completed or an error has<br />

occurred.<br />

channel is the channel where the acquisitions will take place. It has a value of 1 for Board 1 Channel A, 2<br />

for Board 1 Channel B, 3 for Board 2 Channel A, 4 for Board 2 Channel B, etc.<br />

nsamples is the number of points to be sampled for each acquisition.<br />

naverages is the number of traces to sum. The routine will not complete until this number has been<br />

captured by the digitizer.<br />

sum is a flag that is set to one to skip the division by naverages. This will allow an application to make use<br />

of the unaveraged data to increase dynamic range. Normally the average is performed.<br />

*avg_buffer is a pointer to a buffer containing either the sum of all the data traces or the averaged data,<br />

depending on the value of the sum flag. The size of this buffer must be at least nsamples*sizeof(int32).<br />

The buffer must allocated by the calling program.<br />

*data_buffer is a pointer to a buffer for use by this routine to store data points returned from the digitizer<br />

before they are summed into data_buffer. This buffer must be at least as large as (data_buffer_size) and<br />

sized to the sample size of the <strong>CompuScope</strong> card being used (data_buffer_size * 1 byte for the 8-bit<br />

<strong>CompuScope</strong> cards and data_buffer_size * 2 bytes per sample for the 12/16-bit <strong>CompuScope</strong> cards). This<br />

buffer must be allocated by the calling program. This buffer is not used by the calling program, but is only<br />

a scratch space for this routine.<br />

data_buffer_size is the size of the buffer (data_buffer).<br />

timeout is the amount of time the software should wait for the hardware to respond to a trigger event. The<br />

resolution of the timeout is in hundreds of microseconds. A minus one (all bits set) will cause the software<br />

to wait indefinitely for the trigger event to occur (therefore, if no trigger ever occurs then the software will<br />

appear to hang since it is waiting for an event to happen that never will).<br />

<strong>CompuScope</strong> API Reference <strong>Manua</strong>l 60

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!