我在编一个红绿灯的程序,要求:(1)先是按动启动该按钮I0.0,东西绿灯亮Q0.0,南北红灯亮Q0.1,25S后东西红绿灯闪3次每次一秒,后东西黄灯亮Q0.2,2S后南北绿灯亮Q0.3,东西红灯亮Q0.4,25S后南北绿灯闪3次,每次一秒,后南北黄灯亮Q0.5,后循环下去。 我编的程序是: LD M0.6 A I0.1 A T40 O SM0.1 O M0.0 AN M0.1 = M0.0 LD M0.0 A I0.0 O M0.1 LD M0.5 A T40 OLD AN M0.2 = M0.1 TON T37, 250 LD M0.1 A T37 O M0.2 AN M0.3 = M0.2 LD M0.2 A C1 O M0.3 AN M0.4 = M0.3 = Q0.2 LD M0.3 A T38 O M0.4 AN M0.5 = M0.4 TON T39, 250 LD M0.4 A T39 O M0.5 AN M0.6 = M0.5 LD M0.5 A C2 O M0.6 AN M0.0 AN M0.1 = M0.6 = Q0.5 LD M0.1 O M0.2 O M0.3 = Q0.0 LD M0.1 O T33 = Q0.1 LD M0.3 TON T38, 20 LD M0.4 O M0.5 O M0.6 = Q0.3 LD M0.4 O T35 = Q0.4 LD M0.6 TON T40, 20 LD M0.2 AN T34 TON T33, 50 LD T33 TON T34, 50 LD T33 LD M0.3 CTU C1, 3 LD M0.5 AN T36 TON T35, 50 LD T35 TON T36, 50 LD T35 LD M0.6 CTU C2, 3 可是运行不了,后来我就只编东西的红灯和绿灯,黄灯,运行时发现,可以,我就是不明白,怎么一半行,全体就不可以呢?? 哪个高手帮我看看吧!!!谢谢了 这是我的一半程序(就是只要东西的灯) LD M0.3。 A I0.1 O M0.0 O SM0.1 AN M0.1 = M0.0 LD M0.0 A I0.0 LD M0.3 A T38 OLD O M0.1 AN M0.2 = M0.1 TON T37, 250 LD M0.1 A T37 O M0.2 AN M0.3 = M0.2 LD M0.2 A C1 O M0.3 AN M0.1 AN M0.0 = M0.3 TON T38, 20 LD M0.1 O M0.2 O M0.3 = Q0.0 LD M0.2 AN T34 TON T33, 50 LD T33 TON T34, 50 LD T33 O M0.1 = Q0.1 LD T33 LD M0.3 CTU C1, 3 LD M0.3 = Q0.2 |