3156B User Manual
Racal Instrument © 2005
Programming Reference 5-163
Ri3156b_load_wavecad_wave_file
Description
This function is similar to the Ri3156b_load_arb_data except it points to a file name that was already prepared
and stored on your computer. The complete path to the file location is required. You can use this function to
load files in either 12-bit or 16-bit format, depending on how you define the format of your data with the
fileResolution variable.
Channel Dependency: Independent
C Syntax
ViStatus ri3156b_load_wavecad_wave_file (ViSession instrHandle, ViInt16 segmentNumber, ViString
waveCADWaveformFileName, ViInt32 segmentSize, ViBoolean fileResolution)
Parameters
Name
Variable
Type
Description
instrHandle
ViSession
The Instrument Handle is used to identify the unique
session or communication channel between the driver
and the instrument. If more than one instrument of the
model type is used, this will be used to differentiate
between them. Note that the initialize function may be
used to associate multiple instrument handles with a
single instrument.
segmentNumber
ViInt16
Select the segment number to become active
Valid range: 1 to 16k
Default: 1
waveCADWaveformFileName
ViString
Points to a file name already stored in your computer’s
memory. Full path is required. File extension is *.wav.
The file structure should have waveform coordinates in
the range of: 0 to 0xFFF (12-bit) or 0 to 0xFFFF (16-bit).
The number of points in this file must match the number
of points that are defined for this segment with the
segmentSize variable.
segmentSize
ViInt32
Select the size of the segment to be loaded. Size must
match the number of data points in the data file.
Valid range: 1 to 523264
with SCLK setting of 100MS/s;
2 to 1046528
with SCLK setting of 200MS/s
fileResolution
ViBoolean Defines the data file format: for either 12-bit or 16-bit
Valid range: 0,1
0 – selects 16-bit;
1 – selects 12-bit
Default: 0
Return Values
Displays the return status of the function call. If the function was successful, it will return a status of
VI_SUCCESS, otherwise it will return an error code. Passing the error code into the function
"ri3156B_error_message()" will return a string describing the error.