Daqadcsetdiskfile, Daqadcsetfreq – Measurement Computing TempBook rev.3.0 User Manual
Page 136

11-12 daqCommand Reference (Enhanced API)
TempBook User’s Manual
daqAdcSetDiskFile
DLL Function
daqAdcSetDiskFile(DaqHandleT handle, LPSTR filename, DaqAdcOpenMode openMode,
DWORD preWrite);
C
daqAdcSetDiskFile(DaqHandleT handle, LPSTR filename, DaqAdcOpenMode openMode,
DWORD preWrite);
Visual BASIC
VBdaqAdcSetDiskFile&(ByVal handle&, ByVal filename$, ByVal openMode&, ByVal
preWrite&)
Delphi
daqAdcSetDiskFile(handle:DaqHandleT; filename:PChar; openMode:DaqAdcOpenMode;
preWrite:DWORD)
Parameters
handle
Handle to the device for which direct to disk ADC acquisition is to be performed.
filename
String representing the path and name of the file to place the raw ADC acquisition data.
openMode
Specifies how to open the file for writing
preWrite
Specifies the amount to pre-write(in bytes) the file
Returns
DerrNoError
- No error (also, refer to API Error Codes on page 11-39)
See Also
daqAdcTransferGetStat, daqAdcTransferSetBuffer, daqAdcTransferStart,
daqAdcTransferStop
Program References
ADCEX1.C, DACEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ADCEX.PAS (Delphi)
Used With
All devices
daqAdcSetDiskFile
allows you to set a destination file for ADC data transfers. ADC data
transfers will be directed to the specified disk file. The filename parameter is a string
representing the path\name of the file to be opened. The openMode parameter indicates how the
file is to be opened for writing data. Valid file open modes are defined as follows:
•
DaomAppendFile
- Open an existing file to append subsequent ADC transfers. This mode
should only be used when the existing file has a similar ADC channel group configuration as
the subsequent transfers.
•
DoamWriteFile
- Rewrite or write over an existing file. This operation will destroy the
original contents of the file.
•
DoamCreateFile
- Create a new file for subsequent ADC transfers. This mode does not
require that the file exist beforehand.
The preWrite parameter may, optionally, be used to specify the amount that the file is to be pre-
written before the actual data collection begins. Specifying the pre-write amount may increase the
data-to-disk performance of the acquisition if it is known beforehand how much data will be
collected. If no pre-write is to be done, then the preWrite parameter should be set to 0.
daqAdcSetFreq
DLL Function
daqAdcSetFreq(DaqHandleT handle, FLOAT freq);
C
daqAdcSetFreq(DaqHandleT handle, FLOAT freq);
Visual BASIC
VBdaqAdcSetFreq&(ByVal handle&, ByVal freq!)
Delphi
daqAdcSetFreq(handle:DaqHandleT; freq:single)
Parameters
handle
Handle to the device for which the ADC acquisition frequency is to be set.
freq
The sampling frequency in Hz
Valid values:
100000.0 - 0.0002
Returns
DerrNoError
- No error (also, refer to API Error Codes on page 11-39)
See Also
daqAdcGetFreq, daqAdcSetClockSource
Program References
ADCEX1.C, DACEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ADCEX.PAS (Delphi)
Used With
All devices
daqAdcSetFreq
calculates and sets the frequency of the pacer clock using the frequency
specified in Hz. The frequency is converted to two counter values that control the frequency of the
pacer clock (in this conversion, some resolution of the frequency may be lost). daqAdcRdFreq
can be used to read the exact frequency setting of the pacer clock. daqAdcSetClock can be used
to explicitly set the two counter values of the pacer clock. The pacer clock can be used to control
the sampling rate of the A/D converter.