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.
LGF_JulianTimeToDTL (FC) | ||||||||
---|---|---|---|---|---|---|---|---|
LReal | julianDate | Ret_Val | DTL | |||||
Bool | isModifiedDate | error | Bool | |||||
status | Word | |||||||
Identifier | Data type | Description |
---|---|---|
julianDate | LReal | Julian date to convert (standard or modified, depends on `isModifiedDate`) |
isModifiedDate | Bool | TRUE: `julianDate` is the modified Julian date FALSE: `julianDate` is the regular Julian date |
Identifier | Data type | Description |
---|---|---|
Ret_Val | DTL | Converted time (Date and time). In case of Error DTL default value |
error | Bool | FALSE: No error TRUE: An error occurred during the execution of the FB |
status | Word | 16#0000-16#7FFF: Status of the FB 16#8000-16#FFFF: Error identification (see following Table) |
Code / Value | Identifier / Description |
---|---|
16#0000 | STATUS_NO_ERRROR Status: Execution finished without errors |
16#6001 | WARN_CONVERSION_LIMIT Warning: Julian date (julianDate) is exactly at the lower limit of 01.01.1990. |
16#8000 | ERR_TIME_BEFORE_1990 Error: Julian date `julianDate` is before 01/01/1990. The function does not support this conversion. |
Version & Date | Change description | |
---|---|---|
01.00.00 | Siemens Industry Online Support | |
14.04.2023 | First released version |