DAQmxCreateMapScale
From NI-DAQmx C Functions
DAQmxCreateMapScale
int32 DAQmxCreateMapScale (const char name[], float64 prescaledMin, float64 prescaledMax, float64 scaledMin, float64 scaledMax, int32 preScaledUnits, const char scaledUnits[]);
Purpose
Creates and configures a scale that scales values proportionally from a range of prescaled values to a range of scaled values.
Parameters
| Input | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name |
|
Identifies the custom scale for later use, such as when you create channels. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prescaledMin | float64 | The smallest value in the range of prescaled values. NI-DAQmx maps this value to scaledMin. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prescaledMax | float64 | The largest value in the range of prescaled values. NI-DAQmx maps this value to scaledMax. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaledMin | float64 | The smallest value in the range of scaled values. NI-DAQmx maps this value to prescaledMin. Read operations clip samples that are smaller than this value. Write operations generate errors for samples that are smaller than this value. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaledMax | float64 | The largest value in the range of scaled values. NI-DAQmx maps this value to prescaledMax. Read operations clip samples that are larger than this value. Write operations generate errors for samples that are larger than this value. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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. |