beautypg.com

Tbkrdnforepret – Measurement Computing TempBook rev.3.0 User Manual

Page 73

background image

TempBook User’s Manual

tbkCommand Reference (Standard API) 9-13

tbkRdNForePreT

DLL Function

int tbkRdNForePreT(uint *buf, uint count, uint *retcount, uchar *active);

C

tbkRdNForePreT(unsigned int _far *buf, unsigned int count, unsigned int _far
*retcount, unsigned char _far *active);

QuickBASIC

BtbkRdNForePreT% (buf%, ByVal count%, retcount%, active%)

Visual Basic

VBtbkRdNForePreT% (buf%(), count%, retcount%, active%)

Turbo Pascal

tbkRdNForePreT( buf:WordP; count:word; retcount: WordP; active:ByteP
):integer;

Parameters

uint *buf

An array where the A/D samples will be placed

uint count

The number of scans to be taken
Valid values: 1 - 32767

uint *retcount

Pointer to an integer representing the number of scans actually taken

uchar *active

Pointer to a flag indicating whether or not the pre-trigger acquisition is still active

Returns

TerrFIFOFull

- Buffer overrun

TerrNoError

- No error

See Also

tbkSetTrigPreT, tbkSetTag, tbkRdNForePreTWait, tbkRdNBackPreT

Program References

PRETEX1 (all languages)

tbkRdNForePreT

reads multiple A/D scans, initiated by the tbkSetTrigPreT command, in

the foreground. Unlike the tbkRdNBackPreT command, this function does not use interrupts and
does not return control immediately to the application program. It will only return when either the
specified count has been satisfied or the acquisition completes.

This function may be called subsequent to configuring a pre-trigger acquisition using the
tbkSetTrigPreT

command. Once this command has been called, it will return only when one of

two possible conditions are met: 1) The specified number of scans has been collected, or, 2) the
trigger has been detected and the acquisition has completed. In the latter case, the returned 'active'
flag will be 0 and the number of scans actually collected will be returned in 'retcount'.

Note: If the A/D converter has not been configured to acquire data, this function may wait
indefinitely, hanging the computer.