DscADSampleAvg

Universal Driver Documentation
Performs count A/D conversions on the currently selected channel and returns the average. The function first waits for the board to be ready for a conversion. It then starts the conversion and waits for it to finish before reading data from the board. A built-in timer is used to check for board failure. If the timer times out before the conversion completes, the board returns the error code

Function Definition

BYTE dscADSampleAvg(DSCB board, DFLOAT* sample, int count);

Function Parameters

NameDescription
boardThe handle of the board to operate on
sampleThe average sample resulting from the A/D conversions; the range of return values depends on the type of A/D board.
countThe number of samples to taken when computing the average

Return Value

Error code or 0.


This page was last modified 18:22, 30 Jun 2004.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.