DAQmxCreatePolynomialScale
From NI-DAQmx C Functions
DAQmxCreatePolynomialScale
int32 DAQmxCreatePolynomialScale (const char name[], float64 forwardCoeffs[], uInt32 numForwardCoeffsIn, float64 reverseCoeffs[], uInt32 numReverseCoeffsIn, int32 preScaledUnits, const char scaledUnits[]);
Purpose
Creates and configures a scale that uses an nth order polynomial equation. NI-DAQmx requires both a polynomial to convert prescaled values to scaled values (forward) and a polynomial to convert scaled values to prescaled values (reverse). If you know only one set of coefficients, use DAQmxCalculateReversePolyCoeff to generate the other set.
Parameters
| Input | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name |
|
Identifies the custom scale for later use, such as when you create channels. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| forwardCoeffs |
|
An array of coefficients for the polynomial that converts prescaled values to scaled values. Each element of the array corresponds to a term of the equation. For example, if index 3 of the array is 9, the fourth term of the equation is 9x3. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numForwardCoeffsIn | uInt32 | The number of elements in forwardCoeff. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reverseCoeffs |
|
An array of coefficients for the polynomial that converts scaled values to prescaled values. Each element of the array corresponds to a term of the equation. For example, if index 3 of the array is 9, the fourth term of the equation is 9y3. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numReverseCoeffsIn | uInt32 | The number of elements in reverseCoeff. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| preScaledUnits | int32 | The units of the values to scale.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaledUnits |
|
The units you want to use for the scaled value. You can use an arbitrary value. |
Return Value
| Name | Type | Description |
|---|---|---|
| status | int32 | The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error. |