Difference between revisions of "Component: Thermistor Template (Sensors)"

From Flowcode Help
Jump to navigationJump to search
(XML import - Pre 8.0 release)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix
 
| Matrix
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Sensors
 
| 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.
  
==[[File:Component Icon bd7d5205_c2eb_48b1_8a37_f967f349965f.png|Image]] Thermistor Template component==
+
==Component Pack==
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.
 
  
==Examples==
+
SENSORS
This example simply reads the value from the thermistor sensor component and outputs the value to an LCD as a temperature in degrees C.
 
{{Fcfile|EBM003 - Test Program.fcfx|EBM003 Example}}
 
  
==Downloadable macro reference==
+
==Detailed description==
  
===<span style="font-weight: normal;"><u><tt>GetIntegerTemperature</tt></u></span>===
+
''No detailed description exists yet for this component''
Reads the ADC input and returns the calculated Temperature as Integer degrees C
 
  
'''Parameters'''
+
==Examples==
  
:''This macro has no parameters''
 
  
 +
This example simply reads the value from the thermistor sensor component and outputs the value to an LCD as a temperature in degrees C.
 +
{{Fcfile|EBM003 - Test Program.fcfx|EBM003 Example}}
  
'''Return value'''
+
==Downloadable macro reference==
  
:[[Variable Types|INT]]
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetIntegerTemperature'''
 +
|-
 +
| colspan="2" | Reads the ADC input and returns the calculated Temperature as Integer degrees C&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>GetRealTemperature</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Reads the ADC input and Returns the calculated Temperature as Float value in degrees C
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetChannel'''
 +
|-
 +
| colspan="2" | Set the ADC Channel&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" | ChannelID
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRealTemperature'''
 +
|-
 +
| colspan="2" | Reads the ADC input and Returns the calculated Temperature as Float value in degrees C&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
  
'''Return value'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CalculateTemperature'''
 +
|-
 +
| colspan="2" | Converts the input ADC value and returns the Temperature in tenths of degree C&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ADCValue
 +
|-
 +
| colspan="2" | ADC Reading to be converted&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:[[Variable Types|FLOAT]]
 
  
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetADCValue'''
 +
|-
 +
| colspan="2" | Returns the Raw ADC value from the Analogue Channel&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>CalculateTemperature</tt></u></span>===
 
Converts the input ADC value and returns the Temperature in tenths of degree C
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
:[[Variable Types|UINT]] ''ADCValue''
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
::ADC Reading to be converted
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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.&nbsp;
'''Return value'''
+
|-
 
+
|-
:[[Variable Types|INT]]
+
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 
+
| width="90%" | Temperature
 
+
|-
===<span style="font-weight: normal;"><u><tt>GetADCValue</tt></u></span>===
+
| colspan="2" | The temperature in C - restricted to -25 to +125 range&nbsp;
Returns the Raw ADC value from the Analogue Channel
+
|-
 
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
'''Parameters'''
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
+
|}
:''This macro has no parameters''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|UINT]]
 
 
 
 
 
 
 
==Simulation macro reference==
 
 
 
===<span style="font-weight: normal;"><u><tt>SetChannel</tt></u></span>===
 
Set the ADC Channel
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|INT]] ''ChannelID''
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>SetTemperature</tt></u></span>===
 
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.
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|FLOAT]] ''Temperature''
 
::The temperature in C - restricted to -25 to +125 range
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
  
  
Line 111: Line 127:
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>ADC Channel</u></span>
 
  
This property is of type ''Single analog pin'' and can be referenced with the variable name ''CHANNEL''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
The ADC channel to which the thermistor circuit is connected.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
It is assumed that the thermistor is connected between the ADC pin and 0V, with a fixed resistor connected
+
|-
 
+
|-
between the ADC pin and +V.
+
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]]
 
+
| width="90%" | ADC Channel
<span style="font-weight: normal;"><u>Wiring</u></span>
+
|-
 
+
| colspan="2" | The ADC channel to which the thermistor circuit is connected. It is assumed that the thermistor is connected between the ADC pin and 0V, with a fixed resistor connected between the ADC pin and +V.&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Wiring''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Specifies the arrangement of the Thermistor and Fixed Resistor.
+
| width="90%" | Wiring
 
+
|-
 
+
| colspan="2" | Specifies the arrangement of the Thermistor and Fixed Resistor. Pull Down - Thermistor connected between ADC pin and GND, fixed resistor between ADC pin and VCC. Pull Up - Thermistor connected between ADC pin and VCC, fixed resistor between ADC pin and GND.&nbsp;
 
+
|-
Pull Down - Thermistor connected between ADC pin and GND, fixed resistor between ADC pin and VCC.
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | ADC Bit Resolution
Pull Up - Thermistor connected between ADC pin and VCC, fixed resistor between ADC pin and GND.
+
|-
 
+
| colspan="2" | &nbsp;
<span style="font-weight: normal;"><u>ADC Bit Resolution</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''ADC_BITS''.
+
| width="90%" | Resistor Value
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| colspan="2" | Value in Ohms of the pullup series resistor.  i.e. The resistor is connected between the ADC pin and the positive supply rail.&nbsp;
 
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | -25C Thermistor Value
<span style="font-weight: normal;"><u>Resistor Value</u></span>
+
|-
 
+
| colspan="2" | Value in Ohms of the Thermistor at -25 deg C&nbsp;
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''RESISTOR''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Value in Ohms of the pullup series resistor.  i.e. The resistor is connected between the ADC pin and the
+
| width="90%" | 0C Thermistor Value
 
+
|-
positive supply rail.
+
| colspan="2" | Value in Ohms of the Thermistor at 0 deg C&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>-25C Thermistor Value</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | 25C Thermistor Value
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''M25''.
+
|-
 
+
| colspan="2" | Value in Ohms of the Thermistor at 25 deg C&nbsp;
Value in Ohms of the Thermistor at -25 deg C
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
<span style="font-weight: normal;"><u>0C Thermistor Value</u></span>
+
| width="90%" | 50C Thermistor Value
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P0''.
+
| colspan="2" | Value in Ohms of the Thermistor at 50 deg C&nbsp;
 
+
|-
Value in Ohms of the Thermistor at 0 deg C
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | 75C Thermistor Value
<span style="font-weight: normal;"><u>25C Thermistor Value</u></span>
+
|-
 
+
| colspan="2" | Value in Ohms of the Thermistor at 75 deg C&nbsp;
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P25''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Value in Ohms of the Thermistor at 25 deg C
+
| width="90%" | 100C Thermistor Value
 
+
|-
<span style="font-weight: normal;"><u>50C Thermistor Value</u></span>
+
| colspan="2" | Value in Ohms of the Thermistor at 100 deg C&nbsp;
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P50''.
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | 125C Thermistor Value
Value in Ohms of the Thermistor at 50 deg C
+
|-
 
+
| colspan="2" | Value in Ohms of the Thermistor at 125 deg C&nbsp;
<span style="font-weight: normal;"><u>75C Thermistor Value</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P75''.
+
| width="90%" | Conversion speed
 
+
|-
Value in Ohms of the Thermistor at 75 deg C
+
| colspan="2" | Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>100C Thermistor Value</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Acquisition cycles
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P100''.
+
|-
 
+
| colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample.&nbsp;
Value in Ohms of the Thermistor at 100 deg C
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>125C Thermistor Value</u></span>
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
+
|-
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''P125''.
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
Value in Ohms of the Thermistor at 125 deg C
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
 +
|-
 +
|}

Revision as of 16:24, 7 January 2022

Author Matrix
Version 1.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.

Component Pack

SENSORS

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. FC6 Icon.png EBM003 Example

Downloadable macro reference

Fc9-comp-macro.png GetIntegerTemperature
Reads the ADC input and returns the calculated Temperature as Integer degrees C 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png SetChannel
Set the ADC Channel 
Fc9-s16-icon.png - INT ChannelID
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetRealTemperature
Reads the ADC input and Returns the calculated Temperature as Float value in degrees C 
Fc9-f32-icon.png - FLOAT Return


Fc9-comp-macro.png CalculateTemperature
Converts the input ADC value and returns the Temperature in tenths of degree C 
Fc9-u16-icon.png - UINT ADCValue
ADC Reading to be converted 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png GetADCValue
Returns the Raw ADC value from the Analogue Channel 
Fc9-u16-icon.png - UINT Return


Fc9-comp-macro.png SetTemperature
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. 
Fc9-f32-icon.png - FLOAT Temperature
The temperature in C - restricted to -25 to +125 range 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-6-icon.png ADC Channel
The ADC channel to which the thermistor circuit is connected. It is assumed that the thermistor is connected between the ADC pin and 0V, with a fixed resistor connected between the ADC pin and +V. 
Fc9-type-16-icon.png Wiring
Specifies the arrangement of the Thermistor and Fixed Resistor. Pull Down - Thermistor connected between ADC pin and GND, fixed resistor between ADC pin and VCC. Pull Up - Thermistor connected between ADC pin and VCC, fixed resistor between ADC pin and GND. 
Fc9-type-21-icon.png ADC Bit Resolution
 
Fc9-type-21-icon.png Resistor Value
Value in Ohms of the pullup series resistor. i.e. The resistor is connected between the ADC pin and the positive supply rail. 
Fc9-type-21-icon.png -25C Thermistor Value
Value in Ohms of the Thermistor at -25 deg C 
Fc9-type-21-icon.png 0C Thermistor Value
Value in Ohms of the Thermistor at 0 deg C 
Fc9-type-21-icon.png 25C Thermistor Value
Value in Ohms of the Thermistor at 25 deg C 
Fc9-type-21-icon.png 50C Thermistor Value
Value in Ohms of the Thermistor at 50 deg C 
Fc9-type-21-icon.png 75C Thermistor Value
Value in Ohms of the Thermistor at 75 deg C 
Fc9-type-21-icon.png 100C Thermistor Value
Value in Ohms of the Thermistor at 100 deg C 
Fc9-type-21-icon.png 125C Thermistor Value
Value in Ohms of the Thermistor at 125 deg C 
Fc9-type-16-icon.png Conversion speed
Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock. 
Fc9-type-14-icon.png Acquisition cycles
Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations