Siemens SIMATIC S5-100U System Manual page 334

Simatic s5 series cpu 100/102/103
Hide thumbs Also See for SIMATIC S5-100U:
Table of Contents

Advertisement

The Integral Real-Time Clock
Reading the Current Operating Hours Counter
The current data is stored in words 12 to 14 of the clock data area. You can use load operations to
read out the data.
Example:
Reading the operating hours counter
You need to switch off a machine for inspection after every 300 hours of operation. Flag F 12.4 is
set when the machine is switched off. After 300 hours of operation, a jump is made to PB5 to switch
the machine off (not programmed in the example).
The clock data area is in DB2 beginning with flag word FW0, and the status word is flag word FW10.
OB1 STL
:JU FB
14
NAME :BETR-LES
:
:BE
FB14 STL
NAME :BETR-LES
:C
DB
2
:A
F
12.4
:BEC
:
:L
DL
14
:
:L
KC 003
:><F
:BEC
:
:S
F
12.4
:JU
PB
5
:
:
:BE
12-34
Explanation
EVALUATE OPERATING HOURS COUNTER
Explanation
READING THE OPERATING HOURS COUNTER
DB IN WHICH THE CLOCK DATA IS LOCATED.
IF AUXILIARY FLAG 12.4 IS SET, OFF.
THE MACHINE IS ALREADY
BLOCK END
LOAD HOUR VALUE X 100 IN ACCU 1
COMPARE TO 3 (=300 HOURS)
END IF 300 HOURS NOT YET
REACHED
SET AUXILIARY FLAG
JUMP TO PB5 WHEN 300 OPERATING
HOURS REACHED
S5-100U
EWA 4NEB 812 6120-02b

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents