The Integral Real-Time Clock
S5-100U
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
Explanation
:JU FB 14 EVALUATE OPERATING HOURS COUNTER
NAME :BETR-LES
:
:BE
FB14 STL
Explanation
NAME :BETR-LES READING THE OPERATING HOURS COUNTER
:C DB 2 DB IN WHICH THE CLOCK DATA IS LOCATED.
:A F 12.4 IF AUXILIARY FLAG 12.4 IS SET, OFF.
:BEC THE MACHINE IS ALREADY
:
BLOCK END
:L DL 14 LOAD HOUR VALUE X 100 IN ACCU 1
:
:L KC 003 COMPARE TO 3 (=300 HOURS)
:><F
:BEC END IF 300 HOURS NOT YET
: REACHED
:S F 12.4 SET AUXILIARY FLAG
:JU PB 5 JUMP TO PB5 WHEN 300 OPERATING
: HOURS REACHED
:
:BE
12-34
EWA 4NEB 812 6120-02b
Summary of Contents for SIMATIC S5-100U
Page 6: ...EWA 4NEB 812 6120 02b ...
Page 16: ...EWA 4NEB 812 6120 02b ...
Page 21: ...1 The SIMATIC S5 System Family EWA 4NEB 812 6120 02b ...
Page 22: ...Figures 1 1 Members of the SIMATIC S5 System Family 1 1 EWA 4NEB 812 6120 02b ...
Page 23: ......
Page 27: ......
Page 36: ...EWA 4NEB 812 6120 02b ...
Page 40: ......
Page 41: ......
Page 42: ......
Page 43: ......
Page 48: ......
Page 49: ......
Page 50: ......
Page 102: ...EWA 4NEB 812 6120 02b ...
Page 156: ...EWA 4NEB 812 6120 02b ...
Page 232: ...EWA 4NEB 812 6120 02b ...
Page 268: ...EWA 4NEB 812 6120 02b ...
Page 272: ...EWA 4NEB 812 6120 02b ...
Page 336: ...EWA 4NEB 812 6120 02b ...
Page 352: ...EWA 4NEB 812 6120 02b ...
Page 412: ...EWA 4NEB 812 6120 02b ...
Page 482: ...EWA 4NEB 812 6120 02b ...
Page 484: ...EWA 4NEB 812 6120 02b ...
Page 505: ...B Dimension Drawings EWA 4NEB 812 6120 02b ...
Page 515: ...C Active and Passive Faults in Automation Equipment EWA 4NEB 812 6120 02b ...
Page 516: ...EWA 4NEB 812 6120 02b ...
Page 522: ...EWA 4NEB 812 6120 02b ...
Page 523: ...D Information for Ordering Accessories EWA 4NEB 812 6120 02b ...
Page 524: ...EWA 4NEB 812 6120 02b ...
Page 530: ...EWA 4NEB 812 6120 02b ...
Page 531: ...E Reference Materials EWA 4NEB 812 6120 02b ...
Page 532: ...EWA 4NEB 812 6120 02b ...
Page 534: ...EWA 4NEB 812 6120 02b ...
Page 535: ...F Siemens Addresses Worldwide EWA 4NEB 812 6120 02b ...
Page 536: ...EWA 4NEB 812 6120 02b ...
Page 542: ...EWA 4NEB 812 6120 02b ...
Page 543: ...Index EWA 4NEB 812 6120 02b ...
Page 544: ...EWA 4NEB 812 6120 02b ...
Page 550: ...EWA 4NEB 812 6120 02b ...