Component: Thermistor Template (Sensors): Difference between revisions
Appearance
No edit summary |
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead"" |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 5: | Line 5: | ||
|- | |- | ||
| width="20%" style="color:gray;" | Version | | width="20%" style="color:gray;" | Version | ||
| | | 2.0 | ||
|- | |- | ||
| width="20%" style="color:gray;" | Category | | width="20%" style="color:gray;" | Category | ||
| Line 15: | Line 15: | ||
Base component for creating thermistors. Has no GUI - this would be added by concrete examples using this basem which may or may not expose the propertes. | Base component for creating thermistors. Has no GUI - this would be added by concrete examples using this basem which may or may not expose the propertes. | ||
== | ==Version information== | ||
Library Version, Component Version, Date, Author, Info | |||
5, 2.0, 19-07-24, BR, Added compatibility for external ADC | |||
5, 2.0, 19-07-24, BR, Allowed full bit depth usage of the internal ADC | |||
==Detailed description== | ==Detailed description== | ||
| Line 74: | Line 74: | ||
===CalculateTemperature=== | ===CalculateTemperature=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CalculateTemperature''' | ||
|- | |- | ||
| colspan="2" | Converts the input ADC value and returns the Temperature in tenths of degree C | | colspan="2" | Converts the input ADC value and returns the Temperature in tenths of degree C | ||
| Line 93: | Line 93: | ||
===GetADCValue=== | ===GetADCValue=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetADCValue''' | ||
|- | |- | ||
| colspan="2" | Returns the Raw ADC value from the Analogue Channel | | colspan="2" | Returns the Raw ADC value from the Analogue Channel | ||
| Line 107: | Line 107: | ||
===GetIntegerTemperature=== | ===GetIntegerTemperature=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetIntegerTemperature''' | ||
|- | |- | ||
| colspan="2" | Reads the ADC input and returns the calculated Temperature as Integer degrees C | | colspan="2" | Reads the ADC input and returns the calculated Temperature as Integer degrees C | ||
| Line 121: | Line 121: | ||
===GetRealTemperature=== | ===GetRealTemperature=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetRealTemperature''' | ||
|- | |- | ||
| colspan="2" | Reads the ADC input and Returns the calculated Temperature as Float value in degrees C | | colspan="2" | Reads the ADC input and Returns the calculated Temperature as Float value in degrees C | ||
| Line 130: | Line 130: | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | |||
|} | |||
===SetADCValue=== | |||
{| class="mtx-class-macrotable wikitable" | |||
|- | |||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | |||
| width="90%" class="mtx-class-macrohead" | '''SetADCValue''' | |||
|- | |||
| colspan="2" | Used to set the ADC value when an external ADC is being used. | |||
|- | |||
|- | |||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | |||
| width="90%" | AdcValue | |||
|- | |||
| colspan="2" | Value of the external ADC. e.g. 0-255 for an 8-bit ADC | |||
|- | |||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
| Line 135: | Line 154: | ||
===SetChannel=== | ===SetChannel=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetChannel''' | ||
|- | |- | ||
| colspan="2" | Set the ADC Channel | | colspan="2" | Set the ADC Channel | ||
| Line 154: | Line 173: | ||
===SetTemperature=== | ===SetTemperature=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetTemperature''' | ||
|- | |- | ||
| colspan="2" | Simulation macro that sets the internal ADC value to the appropriate value for a given temperature. This allows all internal systems of the sensor to be simulated. | | colspan="2" | Simulation macro that sets the internal ADC value to the appropriate value for a given temperature. This allows all internal systems of the sensor to be simulated. | ||
| Line 174: | Line 193: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | |||
| width="90%" class="mtx-class-macrohead" | '''Properties''' | |||
|- | |||
|- | |- | ||
| width="10%" align="center | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
| width="90% | | width="90%" | ADC Configuration | ||
|- | |- | ||
| colspan="2" | | |||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-6-icon.png]] | ||
| Line 184: | Line 208: | ||
|- | |- | ||
| colspan="2" | Analogue Input Channel - Which pin is the analogue input connected to? | | colspan="2" | Analogue Input Channel - Which pin is the analogue input connected to? | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
| Line 250: | Line 269: | ||
| colspan="2" | Value in Ohms of the Thermistor at 125 deg C | | colspan="2" | Value in Ohms of the Thermistor at 125 deg C | ||
|} | |} | ||
==Component Source Code== | |||
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Thermistor_base.fcfx FC_Comp_Source_Thermistor_base.fcfx] | |||
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Thermistor_base.fcfx FC_Comp_Source_Thermistor_base.fcfx] | |||
Latest revision as of 14:23, 13 July 2026
| Author | Matrix |
| Version | 2.0 |
| Category | Sensors |
Thermistor Template component
Base component for creating thermistors. Has no GUI - this would be added by concrete examples using this basem which may or may not expose the propertes.
Version information
Library Version, Component Version, Date, Author, Info 5, 2.0, 19-07-24, BR, Added compatibility for external ADC 5, 2.0, 19-07-24, BR, Allowed full bit depth usage of the internal ADC
Detailed description
No detailed description exists yet for this component
Examples
This example simply reads the value from the thermistor sensor component and outputs the value to an LCD as a temperature in degrees C.
EBM003 Example
Macro reference
CalculateTemperature
| CalculateTemperature | |
| Converts the input ADC value and returns the Temperature in tenths of degree C | |
| ADCValue | |
| ADC Reading to be converted | |
| Return | |
GetADCValue
| GetADCValue | |
| Returns the Raw ADC value from the Analogue Channel | |
| Return | |
GetIntegerTemperature
| GetIntegerTemperature | |
| Reads the ADC input and returns the calculated Temperature as Integer degrees C | |
| Return | |
GetRealTemperature
| GetRealTemperature | |
| Reads the ADC input and Returns the calculated Temperature as Float value in degrees C | |
| Return | |
SetADCValue
| SetADCValue | |
| Used to set the ADC value when an external ADC is being used. | |
| AdcValue | |
| Value of the external ADC. e.g. 0-255 for an 8-bit ADC | |
| Return | |
SetChannel
| SetChannel | |
| Set the ADC Channel | |
| ChannelID | |
| Return | |
SetTemperature
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Thermistor_base.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Thermistor_base.fcfx