TDMS_CreateThermocoupleScalingInfo
- Updated2023-02-21
- 3 minute(s) read
TDMS_CreateThermocoupleScalingInfo
int TDMS_CreateThermocoupleScalingInfo (TDMSAnyHandle handle, TDMSThermocoupleType thermocoupleType, int inputSource, int *scaleID);
Purpose
Creates thermocouple scaling information for one or more channels. The thermocouple scaling information scales the data values from microvolts to degrees Celsius. If the data is not in microvolts, first convert the data to microvolts with an additional scale. For example, you can use TDMS_CreateLinearScalingInfo to do the unit conversion. Pass the value of the scaleID output parameter from TDMS_CreateLinearScalingInfo as the value of the inputSource input parameter to TDMS_CreateThermocoupleScalingInfo.
Once scaling information has been created for a channel, TDMS_GetDataType will report the type of the channel as TDMS_Double and TDMS_GetDataValues will return the scaled data values. The read functions in the Advanced Synchronous and Asynchronous I/O class will still return the unscaled data values.
(Linux) This function is not supported.
Parameters
Input | ||||||||||||||||||||
Name | Type | Description | ||||||||||||||||||
handle | TDMSAnyHandle | A file, channel group, or channel handle. The scaling information is stored as properties of the specified file, channel group, or channel. If you pass a channel handle, the scaling information will apply only to that channel. If you pass a channel group handle, the scaling information will apply to all channels in that channel group. If you pass a file handle, the scaling information will apply to all channels in that file. If scaling information has been created at multiple levels, the scaling information at the most specific level will take precedence. For example, scaling information on a channel will take precedence over scaling information on the containing channel group or the containing file. |
||||||||||||||||||
thermocoupleType | TDMSThermocoupleType | The type of the thermocouple. Thermocouple types differ in composition and measurement range.
|
||||||||||||||||||
inputSource | int | The scale ID representing the scaling information that will be applied before the scaling information added by this function is applied. Pass -1 if no scaling information should be applied first. When you pass -1 the scaling information added by this function will replace any existing scaling information for the specified file, channel group, or channel. You can use this parameter to combine multiple scales to create a compound scale. You do this by passing the value of the scaleID output parameter from one scaling function as the value of the inputSource input parameter of another scaling function. |
||||||||||||||||||
Output | ||||||||||||||||||||
Name | Type | Description | ||||||||||||||||||
scaleID | int | A scale ID representing the scaling information created by this function. If you passed a value other than -1 for the inputSource parameter, then this scale ID represents the cumulative scaling information represented by that parameter plus the scaling information created by this function. You only need this value if you want to pass it as the value of the inputSource parameter to another scaling function. If you do not need this value you can pass NULL for this parameter. |
Return Value
Name | Type | Description |
status | int | Return value indicating whether the function was successful. Unless otherwise stated, zero represents successful execution and a negative number represents the error code. Error codes are defined in cvi\include\cvitdms.h. |
Additional Information
Library: TDM Streaming Library
Include file: cvitdms.h
LabWindows/CVI compatibility: LabWindows/CVI 2013 and later
© 2016 National Instruments. All rights reserved.