VTI Instruments Corp.
134
EX1629 Command Set
vtex1629_get_cal_file
F
UNCTION
P
ROTOTYPE
ViStatus vtex1629_get_cal_file (ViSession
vi
, ViInt32
fileType
, ViInt32
bufferSize
, ViString
xmlBuffer
, ViPInt32
actualSize
);
F
UNCTION
P
ARAMETERS
vi
= contains a session handle to the instrument. This handle is obtained by the function and remains valid until the
session is closed.
fileType
= deinfes the file type that will be acquired. Valid input values: 0 through 3. See the
Description
section
below for more information.
bufferSize
= defines the size of the
xmlBuffer
allocated array.
xmlBuffer
= defines the location where the requested calibration file will be loaded.
actualSize
= returns the number of bytes actually read by the API. The API reads up to
bufferSize
characters from
the EX1629 and places them in the buffer.
D
ATA
I
TEM
R
ESET
V
ALUE
Not applicable to this function.
D
ESCRIPTION
This function reads up to
bufferSize
characters from the EX1629 and places them in the XML buffer. It returns, in
the
actualSize
parameter
,
the number of bytes read.
The
fileType
parameter has the following valid input values:
Decimal
Value
Hex
Value
#define Symbol
Description
0
0x00
VTEX1629_CAL_DATA_COMBINED
Both self and factory calibration data
1
0x01
VTEX1629_CAL_DATA_SELF
Self-calibration data
2
0x02
VTEX1629_CAL_DATA_FACTORY
Factory calibration data
3
0x03
VTEX1629_CAL_DATA_COMBINED_XML
Both self and factory calibration data in XML format.
The
bufferSize
parameter represents the size of the
xmlBuffer
parameter. Ideally, the user should first call the
vtex1629_get_cal_file_size function to determine size of the desired calibration file and, hence, the appropriate
value for this parameter. If this parameter is not set to one of the valid values listed above, an error of
VI_ERROR_PARAMETER2
will be returned.
E
XAMPLE
ViSession instrumentHandle;
ViStatus status = VI_SUCCESS;
ViChar errMessage[256];
ViInt32 fileType = 0;
ViString buffer = 0;
ViInt32 bufferSize = 0;
ViInt32 actualSize = 0;
…
fileType = VTEX1629_CAL_DATA_SELF;
status = vtex1629_get_cal_file_size(instrumentHandle, fileType, &bufferSize);
if(status < VI_SUCCESS) {
Log("Error occurred when getting cal file size");
vtex1629_error_message (vi, status, errMessage);
Log(errMessage);
}
if(status > VI_SUCCESS) {
buffer = malloc( bufferSize * sizeof(ViString) );
status = vtex1629_get_cal_file(instrumentHandle,
Содержание EX1629
Страница 310: ...VTI Instruments Corp 310 EX1629 Command Set...
Страница 342: ...VTI Instruments Corp 342 EX1629 Onboard Memory...