Technical data

Table Of Contents
IEC Functions
System Software for S7-300/400 System and Standard Functions - Volume 2/2
26-8
A5E00739858-01
Description FC8 DT_TOD
The function FC8 extracts the data type format TIME_OF_DAY from the format
DATE_AND_TIME. The function does not report any errors.
Parameter Declaration Data Type Memory Area Description
IN INPUT DATE_AND_TIME D, L Input variable in format DT
RET_VAL OUTPUT TIME_OF_DAY I, Q, M, D, L Return value in format TOD
You can assign only a symbolically defined variable for this input.
Description FC33 S5TI_TIM
The function FC33 converts the data type format S5TIME to the format TIME. If the
result of the conversion is outside the TIME range, the result is limited to the
corresponding value and the binary result (BR) bit of the status word is set to "0".
Parameter Declaration Data Type Memory Area Description
IN INPUT S5TIME I, Q, M, D, L, Const. Input variable in format S5TIME
RET_VAL OUTPUT TIME I, Q, M, D, L Return value in format TIME
Description FC34 SB_DT_DT
The function FC34 subtracts two time values (format DT) and provides a duration
(format TIME) as the result. The times must be in the range from DT#1990-01-01-
00:00:00.000 to DT#2089-12-31-23:59:59.999. The function does not run an input
check. If the first time (parameter T1) is greater (more recent) than the second
(parameter DT2), the result is positive; if the first time is smaller (less recent) than
the second, the result is negative. If the result of the subtraction is outside the
TIME range, the result is limited to the corresponding value and the binary result
(BR) bit of the status word is set to “0".
Parameter Declaration Data Type Memory Area Description
DT1 INPUT DATE_AND_TIME D, L First time in format DT
DT2 INPUT DATE_AND_TIME D, L Second time in format DT
RET_VAL OUTPUT TIME I, Q, M, D, L Difference in format TIME
You can assign only a symbolically defined variable for the input parameters.