DAQmxCreateLinScale
From NI-DAQmx C Functions
DAQmxCreateLinScale
int32 DAQmxCreateLinScale (const char name[], float64 slope, float64 yIntercept, int32 preScaledUnits, const char scaledUnits[]);
Purpose
Creates and configures a scale that uses the equation y=mx+b, where x is the prescaled value and y is the scaled value. The equation is identical for input and output. If your equation is in the form x=my+b, you must first solve for y in terms of x.
Parameters
| Input | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name |
|
Identifies the custom scale for later use, such as when you create channels. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| slope | float64 | The slope, m, in the equation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| yIntercept | float64 | The y-intercept, b, in the equation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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. |