beautypg.com

Measurement Computing TempBook rev.3.0 User Manual

Page 109

background image

TempBook User’s Manual

Enhanced API Programming Models (TempBook) 10-13

ret& = VBdaqWaitForEvent(handle&,DteAdcData&)

‘ New data has been transferred - Check status
ret& = VBdaqAdcTransferGetStat&(handle&,active&,retCount&)

‘ Code may be placed here which will process the buffered data or
‘ perform other application activities.

‘ At some point the application needs to determine the event on which
‘ the direct-to-disk acquisition is to be halted and set the
‘ acqTermination flag.

Loop While acqTermination& = 0

At this point the application is ready to terminate the acquisition to disk. The following line will terminate
the acquisition to disk and will close the disk file.

ret& = VBdaqAdcDisarm&(handle&)

The acquisition as well as the data transfer has been stopped. We should check status one more time to get
the total number of scans actually transferred to disk.

ret& = VBdaqAdcTransferGetStat(handle&,active&,retCount&)

The specified disk file is now available. The retCount& parameter will indicate the total number of
scans transferred to disk.