The Integral Real-Time Clock S5-100U
Example: Setting the operating hours counter
The status of input I 0.7 determines whether the operating hours counter values are transferred.
You must transfer these values to flag bytes FY136 to FY140 before setting input I 0.7 (not
implemented in the example program). Values that are not to be changed should be preset
with FF
H
.
Errors are displayed in flag F 12.3. The clock data area is in data block DB2 beginning with data
word DW0, and the status word is flag word FW10.
OB1 STL Explanation
: ===================================
: SETTING THE OPERATING HOURS COUNTER
: ===================================
: LOAD VALUES INTO FY136 TO FY140
:
:A I 0.7 TRIGGER TRANSFER OF SETTINGS FOR
:S F 20.2 OPERATING HOURS COUNTER BY SETTING
: F 20.2
:JU FB 12
NAME :SET OPER. HOURS COUNTER (SETTING THE OPERATING HOURS COUNTER)
SEC : FY 136 SECONDS
MIN : FY 137 MINUTES
HOUR0: FY 138 HOURS
HOUR2: FY 139 HOURS X 100
HOUR4: FY 140 ERRORS X 10000
ERR : F 12.3 ERROR BIT
:BE
12-32
EWA 4NEB 812 6120-02