Type
| Function |
Description
| Adds the duration (LTIME) connected to IN2 to the point in time (LTIME_OF_DAY) connected to IN1 and delivers a point in time (LTIME_OF_DAY). |
Notes
|
- When the addition result exceeds the permissible range of the output value, an overflow occurs (see also the following item).
- When the result of the calculation exceeds the permissible range of the LTIME_OF_DAY output value (00:00:00.0 to 23:59:59.999999999), a value less than 0 or greater or equal 24h is interpreted and displayed as time value in nanoseconds. There is no runtime error and no entry output in the MESSAGES window.Example in ST:out := ADD_LTOD_LTIME(LTOD#13:00:00 , LTIME#1d1h); (* results in LTOD#136800000000000 ns*)
- The function provides implicit data type conversion at its input and output parameters according to the rules defined by the IEC 61131 standard.
|
Parameters
| Inputs
IN1
Data type: | LTIME_OF_DAY |
Description: | Point in time to which the duration at IN2 is added. |
IN2
Data type: | LTIME |
Description: | Duration to add. |
Output
Out
Data type: | LTIME_OF_DAY |
Description: | Result point in time. |
|
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 |
Overflow | Overflow value |
|
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.
|