Technical data

Table Of Contents
SFCs for Handling Run-Time Meters
System Software for S7-300/400 System and Standard Functions - Volume 1/2
6-6
A5E00709327-01
6.5 Reading a Runtime Meter with SFC 4 "READ_RTM"
Description
With SFC 4 "READ_RTM" (read runtime meter), you read a runtime meter. SFC 4
provides the current run time as output data and the status of the counter, for
example, "stopped" or "counting."
If the runtime meter runs for longer than 32767 hours, it stops at the count 32767
and outputs the error message "overflow."
Parameter Declaration Data Type Memory Area Description
NR INPUT BYTE I, Q, M, D, L,
constant
Input NR contains the number of the
runtime meter you want to read (possible
values: 0 to 7).
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs while processing the
function, the return value contains an
error code.
CQ OUTPUT BOOL I, Q, M, D, L Output CQ indicates whether the runtime
meter is running or stopped. The signal
state "0" shows that the runtime meter is
stopped. Signal state "1" shows that the
runtime meter is running.
CV OUTPUT INT I, Q, M, D, L Output CV indicates the current value of
the runtime meter.
Error Information
Error Code (W#16#...) Explanation
0000 No error
8080 Wrong number for the runtime meter
8081 Overflow of the runtime meter
8xyy General error codes, see Evaluating Errors with Output Parameter
RET_VAL