Sample Program For Creating A Clock - Siemens SIMATIC TD 200 User Manual

Operator interface
Hide thumbs Also See for SIMATIC TD 200:
Table of Contents

Advertisement

Creating Sample Programs
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.
Ladder Logic
Network 1
SM0.0
VB100
VB101
VB102
VB100
VB103
VB104
VB105
16#80
Network 2
Figure 4-3
4-4
NETWORK 1
READ-RTC
LD
TODR VB100
EN
HTA
T
HTA
HTA
HTA
HTA
EN
HTA
HTA
IN
NETWORK 2
2
LEN
OUT
VB20
MEND
HTA
EN
IN
LEN
OUT
2
VB23
HTA
EN
IN
LEN
OUT
2
VB26
HTA
EN
IN
2
LEN
OUT
VB32
HTA
EN
IN
LEN
OUT
2
VB35
HTA
EN
IN
LEN
OUT
2
VB38
MOV_B
EN
IN
OUT
VB12
END

Sample Program for Creating a Clock

Statement List
SM0.0
// on every scan
// ...get the clock data
VB101, VB20, 2
// ...convert the month
VB102, VB23, 2
// ...convert the day
VB100, VB26, 2
// ...convert the year
VB103, VB32, 2
// ...convert the hour
VB104, VB35, 2
// ...convert the minute
VB105, VB38, 2
// ...enable the message
SIMATIC TD 200 Operator Interface
C79000-G7076-C205-04

Advertisement

Table of Contents
loading

Table of Contents