EasyManua.ls Logo

VTI Instruments EX1629 - Vtex1629_Get_Cal_File

Default Icon
346 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
VTI Instruments Corp.
134 EX1629 Command Set
vtex1629_get_cal_file
FUNCTION PROTOTYPE
ViStatus vtex1629_get_cal_file (ViSession vi, ViInt32 fileType, ViInt32 bufferSize, ViString xmlBuffer, ViPInt32
actualSize);
FUNCTION PARAMETERS
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.
DATA ITEM RESET VALUE
Not applicable to this function.
DESCRIPTION
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.
EXAMPLE
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,

Table of Contents

Related product manuals