B-10 API Commands
Appendix B,
887095
Personal Daq User’s Manual
daqAdcSetDataFormat
DLL Function
daqAdcSetDataFormat(DaqHandleT handle, daqAdcRawDataFormatT rawFormat,
daqAdcPostProcDataFormatT postProcFormat);
C
daqAdcSetDataFormat(DaqHandleT handle, DaqAdcRawDataFormatT rawFormat,
DaqAdcPostProcDataFormatT postProcFormat);
Visual BASIC
VBdaqAdcSetDataFormat&(ByVal handle&, ByVal rawFormat&, ByVal postProcFormat&)
Delphi
daqAdcSetDataFormat(Handle:DaqHandleT; rawFormat:daqAdcRawDataFormatT rawFormat;
postProcFormat:daqAdcPostProcDataFormatT);
Handle
The handle to the device for which to set the option
RawFormat
Specifies the raw data format
Parameters
PostProcFormat
Flags specifying the options to use
Returns
DerrNoError
No error
See Also
daqCvtRawDataFormat,daqCvtRawDataFormat
Program References
None
Used With
All devices
Description
daqAdcSetDataFormat
allows the setting of the raw and the post-acquisition data formats which will be returned by the acquisition
transfer functions.
Note
: Certain devices may be limited to the types of raw and post-acquisition data formats that can be presented.
The
rawFormat
parameter indicates how the raw data format is to be presented. Normally, the raw-data format represents the data from
the A/D converter. The default value for this parameter is
DardfNative
where the raw-data format follows the native-data format of the
A/D for the particular device.
The Personal Daq requires that the
rawFormat
parameter be set to
DardfFloat
. This format indicates that the driver should return the
raw data in floating point format. In this case the floating point data returned will be indicative of the type of channel configured. For
instance, if the channel is configured as a volts/mvolts/uvolts channel then the floating point value returned for the channel will be in volts.
If the channel is configured as temperature (thermocouple) then the floating point value returned for that channels will be in degrees C.
The
postProcFormat
parameter specifies the format for which post-acquisition data will be presented. This format is used by the one-
step functions of the form
daqAdcRd
…
. The default value is
DappdfRaw
where the post-acquisition data format will follow the
rawFormat
parameter.
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)
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
Parameters
preWrite
Specifies the number of bytes to pre-write in the file
Returns
DerrNoError
No error
See Also
daqAdcTransferGetStat, daqAdcTransferSetBuffer, daqAdcTransferStart,
daqAdcTransferStop
Program References
None
Used With
All devices
Description
daqAdcSetDiskFile
allows you to set a destination file for data transfers. 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 data transfers. This mode should only be used when the existing
file has a similar channel scan group configuration as the subsequent transfers.
•
DaomWriteFile
- Rewrite or write over an existing file. This operation will destroy the original contents of the file.
•
DaomCreateFile
- Create a new file for subsequent data 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.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com