www.vtiinstruments.com
EX10xxA Function Calls 263
vtex10xxA_set_user_conversion
FUNCTION PROTOTYPE
ViStatus vtex10xxA_set_user_conversion(ViSession vi, ViInt32 eu_conv, ViReal64 fwdcoeff[], ViInt32 numFwd,
ViReal64 invcoeff[], ViInt32 numInv);
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.
eu_conv = the polynomial set to be defined. Value must be an integer equal to 9 (User0) or 10 (User1).
fwdcoeff[] = an array of forward conversion polynomial coefficients. Coefficients c
0
through c
12
are represented in
array elements [0] through [12], respectively.
numFwd = the length of the forward coefficients array. Valid input values: 1 through 13.
invcoeff[] = an array of inverse conversion polynomial coefficients. Coefficients d
0
through d
12
are represented in
array elements [0] through [12], respectively.
numInv = the length of the inverse coefficients array. Valid input values: 1 through 13.
DATA ITEM RESET VALUE
fwdcoeff[] = 0 in all array elements for both polynomial sets.
invcoeff[] = 0 in all array elements for both polynomial sets.
DESCRIPTION
This function sets the user-defined conversion polynomials.
The forward conversion polynomial is used to convert a CJC temperature into a compensating cold junction voltage
and has the form of:
where E is in volts, t is in ºC, and c
o
– c
12
are the coefficients.
The inverse conversion polynomial is used to convert a compensated input voltage into temperature and has the
form of:
where E is in volts, t is in ºC, and d
o
– d
12
are the coefficients.
Undefined coefficients are automatically set to 0.
NOTE The entry of user-defined coefficients does not automatically enable their use. The enabling is done
by setting the EU conversion to User0 or User1 through the vtex10xxA_set_channel_conversion
function.
EXAMPLE