LD M0.6 A I0.1 A T40 O SM0.1 O M0.0 AN I0.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 = Q0.1 TON T38, 300 LD M0.4 O M0.5 O M0.6 = Q0.3 LD M0.4 = Q0.4 TON T40, 300 LD T37 AN T34 TON T33, 50 LD T33 TON T34, 50 = Q0.1 LD T33 LD M0.3 CTU C1, 3 LD T39 AN T36 TON T35, 50 LD T35 TON T36, 50 = Q0.4 LD T35 LD M0.6 CTU C2, 3 这是我刚编的PLC程序,是关于路灯的,要求是:(1)按动启动按钮后,信号灯开始工作,南北红灯,东西绿灯。 (2)东西绿灯亮25S后,闪烁3次,每次1S,接着东西黄灯亮,2S后东西红灯,南北绿灯。在以后循环,I0.0为启动按钮,I0.1为停止按钮 我不知道哪错了,这是我第一次编程序,请大家帮我看看,谢谢了 |