// 处理月份
LD SM0.0
LPS
MOVD LD1, AC1
AENO
+D 1, AC1
AENO
MOVB *AC1, LB24
AENO
BTI LB24, LW12
AENO
-I 1, LW12
AENO
ITB LW12, LB23
LPP
MOVD LD5, AC2
+D 1, AC2
Network 18
LD SM0.0
AW> LW10, 0
MOVB LB24, *AC2
Network 19
LD SM0.0
LPS
AW<= LW10, 0
LPS
AW> LW12, 0
MOVB LB23, *AC2
LPP
AW<= LW12, 0
MOVW LW12, AC3
AENO
+I +12, AC3
AENO
MOVB AC3, *AC2
LPP
SCRT S0.3
Network 20
SCRE
Network 21
LSCR S0.3
Network 22
// 处理年
LD SM0.0
LPS
MOVD LD1, AC1
AENO
+D 0, AC1
AENO
MOVB *AC1, LB26
AENO
BTI LB26, LW14
AENO
-I 1, LW14
AENO
ITB LW14, LB23
LPP
MOVD LD5, AC2
+D 0, AC2
Network 23
LD SM0.0
AW> LW12, 0
MOVB LB26, *AC2
Network 24
LD SM0.0
LPS
AW<= LW12, 0
LPS
AW>= LW14, 0
MOVB LB23, *AC2
LPP
AW< LW14, 0
MOVW LW14, AC3
AENO
+I +99, AC3
AENO
MOVB AC3, *AC2
LPP
SCRT S0.0
Network 25
SCRE
END_SUBROUTINE_BLOCK
最佳答案
代码太长可以截图以图片方式上传
提问者对于答案的评价:
没有满意答案
原创文章,作者:ximenziask,如若转载,请注明出处:https://www.zhaoplc.com/plc279842.html