LGF_ConvertTemperature (FC / V3.0.1)

Overview

Author: Siemens Digital Industry Support

Short description

This function converts a temperature value from one into another unit by using an appropriate given mode parameter.

Block Interface

LGF_ConvertTemperature (FC)
Int  mode Ret_Val  Real
    
Real  value error  Bool
    
   status  Word
    
   

Input parameter

IdentifierData type Description
modeInt 1: Celsius to Fahrenheit,
2: Fahrenheit to Celsius,
3: Celsius to Kelvin,
4: Kelvin to Celsius,
5: Fahrenheit to Kelvin,
6: Kelvin in Fahrenheit,
7: Rankine to Kelvin,
8: Kelvin to Rankine
valueReal Temperature value to be converted

Output parameter

IdentifierData type Description
Ret_ValReal Converted temperature result
errorBool FALSE: No error
TRUE: An error occurred during the execution of the FB
statusWord 16#0000-16#7FFF: Status of the FB
16#8000-16#FFFF: Error identification (see following Table)

Status & Error codes

Code / ValueIdentifier / Description
16#8200ERR_WRONG_MODE
Error: Incorrect mode on input “mode”, see description of the input parameters

Change log

Version & DateChange description
01.00.00Siemens Industry Online Support
19.08.2015First released version
01.00.01Siemens Industry Online Support
02.01.2017Upgrade: TIA Portal V14 Update 1
01.00.02Siemens Industry Online Support
17.08.2018Upgrade: TIA V15 Update 2
01.00.03Siemens Industry Online Support
23.11.2018Upgrade: TIA V15.1
02.00.00Simatic Systems Support
16.12.2018Rename from "LGF_TemperatureConvert" to "LGF_ConvertTemperature"
to start with the verb
include the Rankine conversion
Code refactoring, regions, commends and constants
03.00.00Simatic Systems Support
23.04.2020Set version to V3.0.0
harmonize the version of the whole library
03.00.01Simatic Systems Support
22.02.2021Insert documentation