Type
| Function |
Description
| Concatenates (combines) the integer values (ANY_INT) for year, month and day to build a date. The result is stored to the output of the data type LDATE.The function is an overloaded function. It can operate on all ANY_INT input data types. |
Parameters
| Inputs
YEAR
Data type: | ANY_INT |
Permissible range: | 1 - 9999 |
MONTH
Data type: | ANY_INT |
Permissible range: | 1 - 12 |
DAY
Data type: | ANY_INT |
Permissible range: | 1 through the number of days in the MONTH. |
Output
OUT
Data type: | LDATE |
Description: | Date |
|
Error behavior
| Error behavior
The following table shows the errors which may occur while executing the function and the value returned by the function in the corresponding error case.
Error case | Output value |
Year, month, or day out of permissible range | LD#1970-01-01 |
Invalid date for month (e.g. 30.02.2021, 31.04.2021) | LD#1970-01-01 |
Resulted date outside min/max values min: 1677-09-22 max: 2262-04-11 | Overflow value |
If one of the listed error occurs, the 'Argument out of range' error is written to the Online Log in the MESSAGES window.
|
Examples
| Example in ST
out := CONCAT_LDATE(2016, 11, 14); (* results in LDATE#2016-11-14 *) |
Additional information
| EN/ENO behavior
The POU is only executed if TRUE is applied to the EN input. If EN = FALSE, the POU is not executed and ENO = FALSE indicates the inactivity.
If any of the errors listed under "Error behavior" occurs while executing the function, ENO is set to FALSE.
|