4-4
SIMATIC TD 200 Operator Interface
C79000-G7076-C272-01
The program displayed in Figure 4-3 generates the clock when you download all of
the blocks to the CPU and put the CPU in RUN mode.
NETWORK 1
LD
SM0.0
// on every scan
TODR VB100
// ...get the clock data
HTA
VB101,
VB20, 2
// ...convert the month
HTA
VB102,
VB23, 2
// ...convert the day
HTA
VB100,
VB26, 2
// ...convert the year
HTA
VB103,
VB32, 2
// ...convert the hour
HTA
VB104,
VB35, 2
// ...convert the minute
HTA
VB105,
VB38, 2
// ...convert the second
MOVB 16#80,
VB12
// ...enable the message
Network 1
Ladder Logic
Statement List
T
VB100
READ-RTC
EN
SM0.0
IN
VB101
HTA
EN
LEN
2
OUT
VB20
IN
VB102
HTA
EN
LEN
2
OUT
VB23
IN
VB100
HTA
EN
LEN
2
OUT
VB26
IN
VB103
HTA
EN
LEN
2
OUT
VB32
IN
VB104
HTA
EN
LEN
2
OUT
VB35
IN
VB105
HTA
EN
LEN
2
OUT
VB38
IN
16#80
MOV_B
EN
OUT
VB12
Figure 4-3
Sample Program for Creating a Clock
Creating Sample Programs
Содержание SIMATIC TD 200
Страница 22: ...1 12 SIMATIC TD 200 Operator Interface C79000 G7076 C272 01 Product Overview and Installation ...
Страница 84: ...A 12 SIMATIC TD 200 Operator Interface C79000 G7076 C272 01 Specifications and Reference ...
Страница 94: ...B 10 SIMATIC TD 200 Operator Interface C79000 G7076 C272 01 Multiple CPU Configurations ...
Страница 126: ...E 6 SIMATIC TD 200 Operator Interface C79000 G7076 C272 01 Modifying a TD 200 Configuration ...