序号 | 地址 | 符号 | 变量类型 | 数据类型 | 注释 |
---|
1 | | EN | IN | BOOL | |
2 | LDO | sec | IN | DINT | |
3 | | | IN | | |
4 | | | IN_OUT | | |
5 | | | OUT | | |
6 | | | TEMP | DINT | 日_dint |
7 | LD4 | hour_dint | TEMP | DINT | 小时dnt |
8 | LD8 | min_dint | TEMP | DINT | 分钟dnt |
9 | LD12 | sec_dint | TEMP | DINT | 秒_dnt |
10 | LD16 | temp1 | TEMP | DINT | |
11 | LD20 | temp2 | TEMP | DINT | |
12 | LD24 | temp3 | TEMP | DINT | |
13 | LD28 | temp4 | TEMP | DINT | |
14 | LD32 | temp5 | TEMP | DINT | |
15 | LW36 | hourint | TEMP | INT | |
16 | LW38 | min_int | TEMP | INT | |
17 | LW40 | sec_int | TEMP | INT | |
18 | 以下位输出结果 | | | | |
19 | VD104 | | | DINT | 输出结果“日” |
20 | VB108 | | | Byte | 输出结果“时” |
21 | VB109 | | | Byte | 输出结果“分” |
22 | VB110 | | | Byte | 输出结果“秒” |
LD SM0.0
LPS
MOVD LD0, VD104
AENO
/D +86400, VD104
AENO
MOVD VD104, LD16
*D +86400, LD16
LRD
MOVD LD0, LD20
AENO
-D LD16, LD20
AENO
MOVD LD20, LD4
AENO
/D +3600, LD4
AENO
MOVD LD4, LD24
*D +3600, LD24
LRD
MOVD LD20, LD28
AENO
-D LD24, LD28
AENO
MOVD LD28, LD8
AENO
/D +60, LD8
AENO
MOVD LD8, LD32
*D +60, LD32
LPP
MOVD LD28, LD12
-D LD32, LD12
LD SM0.0
LPS
DTI LD4, LW36
AENO
DTI LD8, LW38
AENO
DTI LD12, LW40
LPP
ITB LW36, VB108
AENO
ITB LW38, VB109
AENO
ITB LW40, VB110