ConOpSys V2970
P004.07
ANVILEX control operating system
|
Negative temperature coefficient thermistor (NTC) class. More...
#include <NTCT_Sensor.h>
Public Types | |
enum | TNTC_Scala { enum_B25_100_3988 = 1 , enum_B25_100_3900 = 2 } |
NTC temperature scale enumeration. More... | |
enum | TNTC_Value { enum_10000_Ohm = 1 } |
NTC base resistance ebuneration. More... | |
Public Member Functions | |
BOOL | Temperature_To_Resistance (F32 *f32_Resistance, F32 f32_Temperature, TNTC_Scala enum_NTC_Scala, TNTC_Value enum_NTC_Value) |
The function calculates the electrical resistance of NTC at given temperature and defined resistance R0 at 0°C for a NTC element. More... | |
BOOL | Resistance_To_Temperature (F32 *f32_Temperature, F32 f32_Resistance, TNTC_Scala enum_NTC_Scala, TNTC_Value enum_NTC_Value) |
The function calculates temperature by given electrical resistance of a NTC sensor. More... | |
BOOL | Time_To_Temperature (F32 *f32_Temperature, F32 f32_Charging_Time, TNTC_Scala enum_NTC_Scala, TNTC_Value enum_NTC_Value, F32 f32_Relative_Reference_Voltage, F32 f32_Capacitance) |
The function calculates temperature by given charging time. More... | |
Private Member Functions | |
BOOL | Get_Base_Resistance (F32 *f32_Base_Resistance, TNTC_Value enum_NTC_Value) |
The function returns base electrical resistance in ohms. More... | |
BOOL | Get_Scala_Coefficients (F32 *f32_Betta, F32 *f32_Base_Temperature, TNTC_Scala enum_NTC_Scala) |
The function returns base electrical resistance in ohms. More... | |
Negative temperature coefficient thermistor (NTC) class.
enum TNTC::TNTC_Scala |
enum TNTC::TNTC_Value |
|
private |
The function returns base electrical resistance in ohms.
[out] | *f32_Base_Resistance | Base resistance at given temperature. |
[in] | enum_NTC_Value | Value of the NTC termomenter. |
true | Converstion successed |
false | Conversuin error |
References enum_10000_Ohm.
Referenced by Resistance_To_Temperature().
|
private |
The function returns base electrical resistance in ohms.
[out] | *f32_Betta | Betta coefficient. |
[out] | *f32_Base_Temperature | Base temperature in degree celsius. |
[in] | enum_NTC_Scala | Temperature scala |
true | Converstion successed |
false | Conversuin error |
References enum_B25_100_3900, and enum_B25_100_3988.
Referenced by Resistance_To_Temperature().
BOOL TNTC::Resistance_To_Temperature | ( | F32 * | f32_Temperature, |
F32 | f32_Resistance, | ||
TNTC_Scala | enum_NTC_Scala, | ||
TNTC_Value | enum_NTC_Value | ||
) |
The function calculates temperature by given electrical resistance of a NTC sensor.
[out] | *f32_Temperature | Temperature in degree celsius. |
[in] | f32_Resistance | Resistance at given temperature. |
[in] | enum_NTC_Scala | Temperature scala |
[in] | enum_NTC_Value | Value of the NTC element. |
true | Converstion successed |
false | Conversuin error |
References Get_Base_Resistance(), and Get_Scala_Coefficients().
Referenced by TP018_39_KG3_BLA_T1::Execute(), and Time_To_Temperature().
BOOL TNTC::Temperature_To_Resistance | ( | F32 * | f32_Resistance, |
F32 | f32_Temperature, | ||
TNTC_Scala | enum_NTC_Scala, | ||
TNTC_Value | enum_NTC_Value | ||
) |
The function calculates the electrical resistance of NTC at given temperature and defined resistance R0 at 0°C for a NTC element.
[out] | *f32_Resistance | Resistance at given temperature. |
[in] | f32_Temperature | Temperature in degree celsius. |
[in] | enum_NTC_Scala | Temperature scala |
[in] | enum_NTC_Value | Value of the NTC element. |
true | Converstion successed |
false | Converstion error |
BOOL TNTC::Time_To_Temperature | ( | F32 * | f32_Temperature, |
F32 | f32_Charging_Time, | ||
TNTC_Scala | enum_NTC_Scala, | ||
TNTC_Value | enum_NTC_Value, | ||
F32 | f32_Relative_Reference_Voltage, | ||
F32 | f32_Capacitance | ||
) |
The function calculates temperature by given charging time.
[out] | *f32_Temperature | Temperature in degree celsius. |
[in] | f32_Charging_Time | Charging time of the slope capacitor in seconds. |
[in] | enum_NTC_Scala | Temperature scala. |
[in] | enum_NTC_Value | Value of the NTC element. |
[in] | f32_Relative_Reference_Voltage | Comparator relative reference voltage in range 0.1 to 0.9. |
[in] | f32_Capacitance | Capacitance of the integration capacitor in farad. |
true | Converstion successed |
false | Conversuin error |
References Resistance_To_Temperature().
Referenced by TP019_11_KG3_FC::Execute(), and TP019_11_KG3_MOD::Execute().