Siemens SIMATIC S5-115U User Manual page 509

Simatic s5 series cpu 941-7ub11 cpu 942-7ub11 cpu 943-7ub11 and cpu 943-7ub21 cpu 944-7ub11 and cpu 944-7ub21
Table of Contents

Advertisement

S5-115U Manual
Example:
Reading the time and the date.
The time is stored in flag bytes 30 to 36 depending on an external event, simulated here by a
positive edge at input 12.0. Flag 13.1 indicates which mode the clock is operating in. Flag 13.0 is
the AM/PM bit in 12-hour mode.
The clock data area is in DB2 from DW 0 onwards, and the status word is FW 10.
OB1 STL
:
:
:
:A
I
12.0
:AN
F
0.1
:=
F
0.0
:A
I
12.0
:=
F
0.1
:
:A
F
0.0
:JC
FB
13
NAME :UHR-LES
WDAY :
FY
30
DATE :
FY
31
MON
:
FY
32
YEAR :
FY
33
HOUR :
FY
34
AMPM :
F
13.0
MIN
:
FY
35
SEC
:
FY
36
MODE :
F
13.1
:BE
EWA 4NEB 811 6130-02b
Description
================================
READING TIME AND DATE
================================
TIME AND DATE ARE TO BE STORED
IN FY 30 TO FY 36 IN THE CASE OF
POSITIVE EDGE AT I 12.0
(EXTERNAL EVENT).
EDGE FLAG
WEEKDAY
DAY
MONTH
YEAR
HOUR
M13.0=1, AFTERNOON IN 12-HR MODE
MINUTES
SECONDS
F13.1=1, IN 12-HR MODE
Integral Real-Time Clock
13-17

Advertisement

Table of Contents
loading

Table of Contents