niHWS_StoreAnalogWfmI16
C Function Prototype
tHWS_Status niHWS_StoreAnalogWfmI16 (const char filePath[], double rate, double gain, double offset, long compressionLevel, long numSamples, const short* wfmData, long overwriteExistingFile);
Purpose
Creates a new file for storing 16-bit signed integer (I16) analog waveform data.
This function is intended for storing a single waveform in a file. To store multiple waveforms in a file, use the Low Level functions.
Parameters
Name | Type | Description |
---|---|---|
filePath | const char[] | Specifies the path and filename of the HWS file to create or open. The .hws extension is typically used for HWS files, although using this extension is optional. |
rate | double | The rate of the Sample clock used to capture the waveform. |
gain | double | Intended for waveforms to be generated by hardware that supports applying a gain
control to the downloaded waveform. For example, this parameter can be used for the
gain parameter in NI-FGEN.
NI-HWS does not apply this gain when writing the data in wfmData. |
offset | double | Intended for waveforms to be generated by hardware that supports applying an
offset control to the downloaded waveform. For example, this parameter
can be used for the offset parameter in NI-FGEN.
NI-HWS does not apply this offset when writing the data in wfmData. |
compressionLevel | long | Provides control over the amount of compression applied to the waveform samples as
they are written to the HWS file. A value of 0 means no compression. A value of 9 means maximum compression. Values between zero and nine indicate increasing levels of compression. |
numSamples | long | The number of samples the new waveform contains. |
wfmData | const short* | The array containing the data for the waveform. This array should contain at least the amount of data indicated by the value assigned to numSamples. |
overwriteExistingFile | long | Allows this function to overwrite the file if it exists.
Set to 1 to overwrite the existing file and create a new file. Set to 0 to prevent overwriting an existing file. |