Jump to content

Component: Thermocouple (MAX31855 / BL0126) (Environmental): Difference between revisions

From Flowcode Help
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead""
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
Line 92: Line 92:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| width="90%" class="mtx-class-macrohead" | '''Initialise'''
|-
|-
| colspan="2" | Configures the SPI bus ready for communications. 
| colspan="2" | Configures the SPI bus ready for communications. 
Line 106: Line 106:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadReference_Float'''
| width="90%" class="mtx-class-macrohead" | '''ReadReference_Float'''
|-
|-
| colspan="2" | Returns the reference temperature from the last sample as a floating point value in Degrees C. 
| colspan="2" | Returns the reference temperature from the last sample as a floating point value in Degrees C. 
Line 120: Line 120:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadReference_Int'''
| width="90%" class="mtx-class-macrohead" | '''ReadReference_Int'''
|-
|-
| colspan="2" | Returns the reference temperature from the last sample as an integer value in Degrees C. 
| colspan="2" | Returns the reference temperature from the last sample as an integer value in Degrees C. 
Line 134: Line 134:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadThermocouple_Float'''
| width="90%" class="mtx-class-macrohead" | '''ReadThermocouple_Float'''
|-
|-
| colspan="2" | Returns the thermocouple temperature from the last sample as a floating point value in Degrees C. 
| colspan="2" | Returns the thermocouple temperature from the last sample as a floating point value in Degrees C. 
Line 148: Line 148:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadThermocouple_Int'''
| width="90%" class="mtx-class-macrohead" | '''ReadThermocouple_Int'''
|-
|-
| colspan="2" | Returns the thermocouple temperature from the last sample as an integer value in Degrees C. 
| colspan="2" | Returns the thermocouple temperature from the last sample as an integer value in Degrees C. 
Line 162: Line 162:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Sample'''
| width="90%" class="mtx-class-macrohead" | '''Sample'''
|-
|-
| colspan="2" | Reads the memory of the MAX31855 IC and checks for errors. Must be called before any of the Read functions. Returns: 0=OK, 1=Open Circuit, 2=Short GND, 3=Short VCC 
| colspan="2" | Reads the memory of the MAX31855 IC and checks for errors. Must be called before any of the Read functions. Returns: 0=OK, 1=Open Circuit, 2=Short GND, 3=Short VCC 
Line 177: Line 177:
|-
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|-
|-

Revision as of 14:23, 13 July 2026

Author Matrix TSL
Version 1.0
Category Environmental


Thermocouple (MAX31855 / BL0126) component

Component to interface the MAX31855 IC from MAXIM. Uses a standard 3-wire SPI interface to connect to the IC and collect the temperature. IC available in different versions to suit different thermocouple types.

Version information

Library Version, Component Version, Date, Author, Info
8, 1.0, 08-05-25, BR, Added autodetect port on Ev_PostInitialise


Detailed description

No detailed description exists yet for this component

Examples

Example program showing how to use the Thermocouple component. MAX31855_Example






Macro reference

Initialise

Initialise
Configures the SPI bus ready for communications. 
- VOID Return


ReadReference_Float

ReadReference_Float
Returns the reference temperature from the last sample as a floating point value in Degrees C. 
- FLOAT Return


ReadReference_Int

ReadReference_Int
Returns the reference temperature from the last sample as an integer value in Degrees C. 
- INT Return


ReadThermocouple_Float

ReadThermocouple_Float
Returns the thermocouple temperature from the last sample as a floating point value in Degrees C. 
- FLOAT Return


ReadThermocouple_Int

ReadThermocouple_Int
Returns the thermocouple temperature from the last sample as an integer value in Degrees C. 
- INT Return


Sample

Sample
Reads the memory of the MAX31855 IC and checks for errors. Must be called before any of the Read functions. Returns: 0=OK, 1=Open Circuit, 2=Short GND, 3=Short VCC 
- BYTE Return


Property reference

Properties
Thermocouple Properties
Thermocouple Type
Specified at the end of the MAX part number MAX31855X where X is the Thermocouple type. Selects which type of thermocouple the IC works with. 
SPI Properties
Channel
SPI Channel selector 
Prescale
Prescale option selector 
MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Simulation
Simulate Comms
 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_ThermocoupleMAX31855.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_ThermocoupleMAX31855.fcfx