LGF_JulianTimeToDTL (FC / V0.0.1)

Overview

Author: Siemens Digital Industry

Short description

This function converts a given Julian Date (regular or modified) of data type LReal (Double) to a date and time of data type DTL.
The timestamp is calculated based on UTC. This means that the time zone is not considered.

Only times after 01/01/1990 are permitted.

Block Interface

LGF_JulianTimeToDTL (FC)
LReal  julianDate Ret_Val  DTL
    
Bool  isModifiedDate error  Bool
    
   status  Word
    
   

Input parameter

IdentifierData type Description
julianDateLReal Julian date to convert
(standard or modified, depends on `isModifiedDate`)
isModifiedDateBool TRUE: `julianDate` is the modified Julian date
FALSE: `julianDate` is the regular Julian date

Output parameter

IdentifierData type Description
Ret_ValDTL Converted time (Date and time).
In case of Error DTL default value
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#0000STATUS_NO_ERRROR
Status: Execution finished without errors
16#6001WARN_CONVERSION_LIMIT
Warning: Julian date (julianDate) is exactly at the lower limit of 01.01.1990.
16#8000ERR_TIME_BEFORE_1990
Error: Julian date `julianDate` is before 01/01/1990. The function does not support this conversion.

Change log

Version & DateChange description
01.00.00Siemens Industry Online Support
14.04.2023First released version