VTI Instruments Corp.
166
EX1629 Command Set
vtex1629_get_linearscaling_configuration
F
UNCTION
P
ROTOTYPE
ViStatus vtex1629_get_linearscaling_configuration (ViSession
vi
, ViInt32
channel
, ViPReal64
m
, ViPReal64
b
);
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.
channel
= an integer input value that specifies the channel for which the linear scaling coefficients will be returned.
Valid input values: 0 to 47.
m
= a real return value indicating the gain factor
m
in the linear equation y =
m
x +
b
.
b
= a real return value indicating the offset factor
b
in the linear equation y =
m
x +
b
.
D
ATA
I
TEM
R
ESET
V
ALUE
Not applicable to this function.
D
ESCRIPTION
This function returns the slope (
m
) and intercept (
b
) parameters for a channel when configured for linear EU
conversion (
x
being in volts).
NOTE
The
m
parameter (slope) is stored in the same location as the gage factor and the b parameter
(intercept) is stored in the same location as the unstrained voltage. Since the linear scaling EU
conversion and the strain EU conversions are mutually exclusive, this is never an issue in practice.
E
XAMPLE
ViSession instrumentHandle;
ViStatus status;
ViReal64 m, b;
…
status = vtex1629_get_linearscaling_configuration(instrumentHandle, 24, &m, &b);