ADD_LTOD_LTIME¶
Adds a long duration to a long time-of-day.
Note
This feature requires IEC 61131-3 Edition 3. Use
--dialect iec61131-3-ed3 to enable it. See
Enabling Dialects and Features for details.
Signature¶
┌────────────────┐
IN1 ─┤ │
│ ADD_LTOD_LTIME ├─ OUT
IN2 ─┤ │
└────────────────┘
FUNCTION ADD_LTOD_LTIME : LTIME_OF_DAY
VAR_INPUT
IN1 : LTIME_OF_DAY;
IN2 : LTIME;
END_VAR
END_FUNCTION
The return type is LTIME_OF_DAY.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
The time-of-day to offset. |
|
|
The duration to add. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
IN1 offset by IN2. |
Description¶
Returns a new LTIME_OF_DAY offset from IN1 by the duration IN2.
Both values are in milliseconds.
The short form is ADD_TOD_TIME. An operand of the
short type (TIME_OF_DAY and TIME where LTIME_OF_DAY and
LTIME is expected) is accepted and widened to 64 bits.
Example¶
result := ADD_LTOD_LTIME(LTOD#10:00:00, LTIME#1h); (* result = LTOD#11:00:00 *)
See Also¶
ADD_TOD_TIME — the short form
SUB_LTOD_LTIME — subtract a duration from a long time-of-day
SUB_LTOD_LTOD — difference between two long times-of-day
References¶
IEC 61131-3 Edition 3, Table 30