发表于:2004-06-30 16:43:00
201楼
昨天看到这个帖子,想看看到底有多难。很久没有编程了,找了个WIN3.2,下了个仿真器。总算通过了,请大家看看能不能简化一下。时间间隔为10;3;10;10。I0.0启动I0.1停止。
LD I0.0
O M0.0
AN I0.1
= M0.0
LD M0.0
EU
S M0.3, 1
LDN T101
A M0.0
A M0.3
= Q0.0
LD M0.3
TON T101, +100
LD T101
O I0.1
R M0.3, 1
LD Q0.0
ED
S M0.1, 1
LD M0.1
TON T102, +30
LD M0.0
A T102
= Q0.1
LD Q0.1
TON T103, +100
LD T103
O I0.1
R M0.1, 1
LD Q0.1
ED
S M0.2, 1
LD M0.2
TON T104, +100
LD T104
R M0.2, 1
S M0.3, 1
LD I0.1
R M0.2, 1