Difference between revisions of "Component: Thermocouple ( MCP960X) (Environmental)"

From Flowcode Help
Jump to navigationJump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix TSL
 
| Matrix TSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.1
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Environmental
 
| Environmental
 
|}
 
|}
  
  
 +
==Thermocouple component==
 +
Component to interface the MCP960X IC from Microchip. Uses a standard 2-wire I2C interface to connect to the IC and collect the temperature. IC available in different versions to suit different thermocouple types.
  
==[[File:Component Icon 60de8264_7faf_4f77_904e_69bb19909ba8.png|Image]] Thermocouple ( MCP960X) component==
+
==Component Pack==
Component to interface the MCP960X IC from Microchip.
 
Uses a standard 2-wire I2C interface to connect to the IC and collect the temperature.
 
IC available in different versions to suit different thermocouple types.
 
  
==Examples==
+
SENSORS
Here is a basic example to display both the thermocouple temperature and IC surface temperature.
 
  
{{Fcfile|MCP960X Demo.fcfx|MCP960X Demo}}
+
==Detailed description==
  
Sim Demo
 
  
[[File:Sim Demo.png]]
 
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>ReadReference_Int</tt></u></span>===
 
Returns the Reference (IC die) temperature from the last sample as an integer value.
 
  
Use Sample first, which samples both reference & themocouple temperatures.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|INT]]
 
  
  
===<span style="font-weight: normal;"><u><tt>ReadReference_Float</tt></u></span>===
 
Returns the reference (IC die) temperature from the last sample as a floating point.
 
  
Use Sample first, which samples both reference & themocouple temperatures.
+
''No detailed description exists yet for this component''
  
'''Parameters'''
+
==Examples==
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|FLOAT]]
 
  
  
===<span style="font-weight: normal;"><u><tt>Sample</tt></u></span>===
 
Must be called before any of the Read functions.
 
  
Reads the memory of the MCP9600/1 IC. Returns 0 for 9600. Checks for errors, MCP9601 only.
 
  
Returns: 0 = OK, 1 = O/ C Themocouple & 2=S/C Themocouple.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
 
  
 +
Here is a basic example to display both the thermocouple temperature and IC surface temperature.
  
===<span style="font-weight: normal;"><u><tt>ReadThermocouple_Int</tt></u></span>===
+
{{Fcfile|MCP960X Demo.fcfx|MCP960X Demo}}
Returns the thermocouple temperature from the last sample as an integer value.
 
  
Use Sample first, which samples both reference & themocouple temperatures.
+
Sim Demo
  
'''Parameters'''
+
[[File:Sim Demo.png]]
  
:''This macro has no parameters''
+
==Downloadable macro reference==
  
 +
{| 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;" | '''ReadReference_Int'''
 +
|-
 +
| colspan="2" | Returns the Reference (IC die) temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures.&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''
 +
|}
  
'''Return value'''
 
  
:[[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;" | '''ReadRawDataADC'''
 +
|-
 +
| colspan="2" | Returns the thermocouple temperature from the last sample as an integer value in Degrees C.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s32-icon.png]] - LONG
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>ReadThermocouple_Float</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Returns the thermocouple temperature from the last sample as a floating point value.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadReference_Float'''
 +
|-
 +
| colspan="2" | Returns the reference (IC die) temperature from the last sample as a floating point. Use Sample first, which samples both reference & themocouple temperatures.&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''
 +
|}
  
Use Sample first, which samples both reference & themocouple temperatures.
 
  
'''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;" | '''Sample'''
 +
|-
 +
| colspan="2" | Must be called before any of the Read functions. Reads the memory of the MCP9600/1 IC. Returns 0 for 9600. Checks for errors, MCP9601 only.  Returns: 0 = OK, 1 = O/ C Themocouple & 2=S/C Themocouple.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
:''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;" | '''ReadRegister'''
 +
|-
 +
| colspan="2" | Reads a byte from a register&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:[[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;" | '''ReadThermocouple_Int'''
 +
|-
 +
| colspan="2" | Returns the thermocouple temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures.&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>Initialise</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Configures the I2C bus ready for communications.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadThermocouple_Float'''
 +
|-
 +
| colspan="2" | Returns the thermocouple temperature from the last sample as a floating point value. Use Sample first, which samples both reference & themocouple temperatures.&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''
 +
|}
  
'''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]]
'''Return value'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteRegister'''
 
+
|-
:''This call does not return a value''
+
| colspan="2" | Writes a byte to a register&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Address
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Data
 +
|-
 +
| 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''
 +
|}
  
  
 +
{| 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;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Configures the I2C bus ready for communications.&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''
 +
|}
  
==Simulation macro reference==
 
  
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Thermocouple Type</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''ThermocoupleType''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Thermocouple type.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
Selects which type of thermocouple the IC works with.
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Filter Coefficients</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Thermocouple Properties
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''FilterCoef''.
+
|-
 
+
|-
Digitial filter selection.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Thermocouple Type
The higher the number the better the filter.
+
|-
 
+
| colspan="2" | Thermocouple type. Selects which type of thermocouple the IC works with.&nbsp;
Results more stable but take longer to update.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>Unit</u></span>
+
| width="90%" | Filter Coefficients
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Unit''.
+
| colspan="2" | Digitial filter selection. The higher the number the better the filter. Results more stable but take longer to update. &nbsp;
 
+
|-
Select Temperature results to be celsius or  fahrenheit
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Unit
<span style="font-weight: normal;"><u>Address</u></span>
+
|-
 
+
| colspan="2" | Select Temperature results to be celsius or  fahrenheit &nbsp;
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''Address''.
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
Address ranges 0x60 - 0x67 (96 - 103)
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | I2C Properties
 
+
|-
<span style="font-weight: normal;"><u>Channel</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_i2c1::CHANNEL''.
+
| width="90%" | Address
 
+
|-
Channel selection
+
| colspan="2" | Address ranges 0x60 - 0x67 (96 - 103)&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>SDA</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Channel
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_i2c1::SDA''.
+
|-
 
+
| colspan="2" | Channel selection&nbsp;
Pin used for SDA (data signal)
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
<span style="font-weight: normal;"><u>SCL</u></span>
+
| width="90%" | SDA
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_i2c1::SCL''.
+
| colspan="2" | Pin used for SDA (data signal)&nbsp;
 
+
|-
Pin used for SCL (clock signal)
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | SCL
<span style="font-weight: normal;"><u>Simulate Comms</u></span>
+
|-
 
+
| colspan="2" | Pin used for SCL (clock signal)&nbsp;
This property is of type ''True or false'' and can be referenced with the variable name ''SimComms''.
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
''<span style="color:red;">No additional information</span>''
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
+
|-
 
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
<span style="font-weight: normal;"><u>Console Data</u></span>
+
| width="90%" | Simulate Comms
 
+
|-
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi1::ConsoleData''.
+
| colspan="2" | &nbsp;
 
+
|}
Selects if the console data is automatically generated or not
 
 
 
<span style="font-weight: normal;"><u>Scope Traces</u></span>
 
 
 
This property is of type ''True or false'' and can be referenced with the variable name ''cal_spi1::ScopeTraces''.
 
 
 
Selects if the scope traces are automatically generated or not
 
 
 
<span style="font-weight: normal;"><u>API</u></span>
 
 
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_spi1::Injector''.
 
 
 
''<span style="color:red;">No additional information</span>''
 

Latest revision as of 17:23, 9 November 2022

Author Matrix TSL
Version 1.1
Category Environmental


Thermocouple component

Component to interface the MCP960X IC from Microchip. Uses a standard 2-wire I2C interface to connect to the IC and collect the temperature. IC available in different versions to suit different thermocouple types.

Component Pack

SENSORS

Detailed description

No detailed description exists yet for this component

Examples

Here is a basic example to display both the thermocouple temperature and IC surface temperature.

FC6 Icon.png MCP960X Demo

Sim Demo

Sim Demo.png

Downloadable macro reference

Fc9-comp-macro.png ReadReference_Int
Returns the Reference (IC die) temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png ReadRawDataADC
Returns the thermocouple temperature from the last sample as an integer value in Degrees C. 
Fc9-s32-icon.png - LONG Return


Fc9-comp-macro.png ReadReference_Float
Returns the reference (IC die) temperature from the last sample as a floating point. Use Sample first, which samples both reference & themocouple temperatures. 
Fc9-f32-icon.png - FLOAT Return


Fc9-comp-macro.png Sample
Must be called before any of the Read functions. Reads the memory of the MCP9600/1 IC. Returns 0 for 9600. Checks for errors, MCP9601 only. Returns: 0 = OK, 1 = O/ C Themocouple & 2=S/C Themocouple. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadRegister
Reads a byte from a register 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadThermocouple_Int
Returns the thermocouple temperature from the last sample as an integer value. Use Sample first, which samples both reference & themocouple temperatures. 
Fc9-s16-icon.png - INT Return


Fc9-comp-macro.png ReadThermocouple_Float
Returns the thermocouple temperature from the last sample as a floating point value. Use Sample first, which samples both reference & themocouple temperatures. 
Fc9-f32-icon.png - FLOAT Return


Fc9-comp-macro.png WriteRegister
Writes a byte to a register 
Fc9-u8-icon.png - BYTE Address
 
Fc9-u8-icon.png - BYTE Data
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Configures the I2C bus ready for communications. 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Thermocouple Properties
Fc9-type-16-icon.png Thermocouple Type
Thermocouple type. Selects which type of thermocouple the IC works with. 
Fc9-type-16-icon.png Filter Coefficients
Digitial filter selection. The higher the number the better the filter. Results more stable but take longer to update.  
Fc9-type-16-icon.png Unit
Select Temperature results to be celsius or fahrenheit  
Fc9-conn-icon.png I2C Properties
Fc9-type-21-icon.png Address
Address ranges 0x60 - 0x67 (96 - 103) 
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Simulate Comms