程序如下:
网络1
LD SM0.0
LPS
TODR VB1700
FILL +0, VW1600, 8
MOVB VB1700, VB1601
AENO
MOVW VW1600, VW1620
BCDI VW1620
LRD
MOVB VB1701, VB1603
AENO
MOVW VW1602, VW1622
BCDI VW1622
LRD
MOVB VB1702, VB1605
AENO
MOVW VW1604, VW1624
BCDI VW1624
LRD
MOVB VB1703, VB1607
AENO
MOVW VW1606, VW1626
BCDI VW1626
LRD
MOVB VB1704, VB1609
AENO
MOVW VW1608, VW1628
BCDI VW1628
LRD
MOVB VB1705, VB1611
AENO
MOVW VW1610, VW1630
BCDI VW1630
LPP
MOVW VW1706, VW1614
AENO
-I +1, VW1614
AENO
MOVW VW1614, VW1632
BCDI VW1632
网络二://判断年的前面二位是19还是20
LDB>= VB1611, 144
MOVB 25, VB1610
NOT
MOVB 32, VB1610
网络三:
LD M5.1
EU
BMW VW1620, VW1500, 7
网络四:
LD SM0.0
BMB VB1700, VB1520, 8
A M5.2
LPS
MOVW VW1500, VW1540
AENO
IBCD VW1540
AENO
MOVB VB1541, VB1520
LRD
MOVW VW1502, VW1542
AENO
IBCD VW1542
AENO
MOVB VB1503, VB1521
LRD
MOVW VW1504, VW1544
AENO
IBCD VW1544
AENO
MOVB VB1545, VB1522
LRD
MOVW VW1506, VW1546
AENO
IBCD VW1546
AENO
MOVB VB1507, VB1523
LRD
MOVW VW1508, VW1548
AENO
IBCD VW1548
AENO
MOVB VB1509, VB1524
LRD
MOVW VW1510, VW1550
AENO
IBCD VW1550
AENO
MOVB VB1511, VB1525
LRD
MOVW VW1514, VW1554
AENO
+I +1, VW1554
AENO
MOVW VW1554, VW1526
BCDI VW1526
LRD
TODW VB1520
LPP
R M5.2, 1
HMI上面显示的时钟和日期是对的,怎么就无法在HMI上更改呢!也没见到程序哪出问题!
最佳答案
如何同步操作面板与S7-200/300/400 控制器间的日期和时间
https://support.automation.siemens.com/CN/llisapi.dll?func=cslib.csSearch&objaction=cssearch&lang=zh&siteid=cseus&query=&query2=%e5%a6%82%e4%bd%95%e5%90%8c%e6%ad%a5%e6%93%8d%e4%bd%9c%e9%9d%a2%e6%9d%bf%e4%b8%8eS7-200/300/400%20%e6%8e%a7%e5%88%b6%e5%99%a8%e9%97%b4%e7%9a%84%e6%97%a5%e6%9c%9f%e5%92%8c%e6%97%b6%e9%97%b4&content=adsearch%2Fadsearch%2Easpx
提问者对于答案的评价:
OK
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc265582.html