ADD_TOD_TIME¶
Adds a duration to a time-of-day value.
Signature¶
┌────────────┐
IN1 ─┤ │
│ADD_TOD_TIME├─ OUT
IN2 ─┤ │
└────────────┘
FUNCTION ADD_TOD_TIME : TIME_OF_DAY
VAR_INPUT
IN1 : TIME_OF_DAY;
IN2 : TIME;
END_VAR
END_FUNCTION
The return type is TIME_OF_DAY. IN1 is TIME_OF_DAY and
IN2 is TIME.
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 TIME_OF_DAY offset from IN1 by the duration IN2.
Both values are in milliseconds.
Example¶
result := ADD_TOD_TIME(TOD#12:00:00, T#1h); (* result = TOD#13:00:00 *)
See Also¶
SUB_TOD_TIME — subtract duration from time-of-day
SUB_TOD_TOD — difference between two times-of-day