Returns specified number of measurements into an array while specifying the amount of time allowed for filling the array before retuning.
GxCntReadMeasurementArray (nHandle, pdMeasurementBuff, pdwCount, dTimeout, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a counter board. |
padMeasurementBuff |
PDOUBLE |
Array to hold the returned measurements. |
pdwCount |
PDWORD |
Number of measurements to read. Returning the actual number of measurements read. |
dTimeout |
DOUBLE |
Specified the amount of time in mSec allowed for filling the buffer before returning. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
This function is for reading an array of measurements utilizing the maximum throughput of the counter. The function can read measurement when in Fast Frequency, Frequency or Period mode. The GC2220/GC2230/GTX2220/GTX2230 boards can acquire up to 1400/sec theoretical measurements and around 1100/sec real measurements or better. When measurements are made using the Fast Frequency mode the GC2220/GC2230/GTX2220/GTX2230 boards can acquire up to 2300/sec theoretical measurements and around 1400/sec real measurements or better. The maximum number of measurements depends on the CPU speed, system configuration and number application running at the background.
The function returns upon completing reading the requested number of measurements or if the specified amount of time allowed for filling the buffer is up (whichever come first). The function then returns the actual number of reading that was taken.
The function returns upon completing reading the requested number of measurements or if the specified the amount of time allowed for filling the buffer is up (whichever come first).
|
Note: A measurement value that is equal to –1 indicates that the measurement value is out of the board’s measuring range, e.g. measuring a value of 1.4GHz using a GC2220/GTX2220. |
For best results the counter settings should as follows:
The Gate time needs to be set to the minimum (250usec).
The channel Trigger Level Mode should be set to Fixed.
The channel Trigger Level should be set to fixed value, e.g. 0.5V.
The channel Prescale Mode should be turned off.
The following example tries to read 100 measurements in 1Sec:
SHORT nHandle, nStatus;
DWORD dwCount;
DOUBLE dMeasurementBuff[100];
dwCount=100;
GxCntReadMeasurementArray (nHandle, adMeasurementBuff, &dwCount, 1000, &nStatus);
printf (“Number of actual measurements=%d”, dwCount);
GxCntReadMeasurement, GxCntIsMeasurementReady, GxCntReadMeasurementString, GxCntReadStatusRegister, GxCntGetFunction, GxCntGetErrorString