LGF_GetCalendarDay (FC / V3.0.1)


Author: Siemens Digital Industry

Short description

This function uses the specified date to calculate the number of days that have passed since the beginning of the year (1st January).

The function is used in the functions “LGF_GetCalendarWeek_ISO” and “LGF_GetCalendarWeek_US”.

Block Interface

LGF_GetCalendarDay (FC)
DTL  date Ret_Val  DInt
    
   error  Bool
    
   status  Word
    
   

Input parameter

IdentifierData typeDescription
dateDTLDate for the calculation of the calendar days since 1 January.

Output parameter

IdentifierData typeDescription
Ret_ValDIntDays past since January 1st.
errorBoolFALSE: No error / TRUE: An error occurred during the execution of the FB
statusWord16#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_ERROR
Status: no error occurred
16#8201ERR_LIM_DATE
Date out of the range, has to be greater than <1970-01-01 ; 2262-04-11>

Change log

Version & DateChange description
01.00.00Simatic Systems Support
16.07.2019First release
ENO used for internal error handling, interface has error and status
temp tag naming, insert constant
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
19.01.2020Insert documentation