开关:X000,反转:Y000,正转:Y001
指令语句表如下:
LD X000
OUT T0 K2
LD T0
OR Y000
ANI Y001
MPS
ANI T1
OUT Y000
MPP
ANI T2
OUT T1 K13
LD T1
OR Y001
ANI Y000
MPS
ANI T2
OUT Y001
MPP
OUT T2 K6
其实这个题目不是很好~!用顺序功能图也可以完成编程!~
梯形图如
启动X0 停止X1正转Y0 反转Y1,你要不看下我的这个是否符合条件阿
ld xo
or m0
out m0
out t0 k2
pls t0
or t200
ani y0
set y1
ld t2
ani y1
set y0
ld y1
out t1 k13
ld t1
or m1
out m1
out t2 k10
ld y0
out t200 k65
ld t1
rst y1
ld t200
rst y0
ld x1
zrst y0 y1
zrst m0 m1
end
按钮开关:X0 正转:Y0 反转:Y1 按一下开关后电机会按要求一直循环下去。这是按照您的要求写的。请问您的电机不要停止吗?
LD M8002
SET S0
STL S0
LD X0
SET S20
STL S20
OUT T0 K2
LD T0
SET S21
STL S21
OUT Y1
OUT T1 K13
LD T1
SET S22
STL S22
OUT T2 K10
LD T2
SET S23
STL S23
OUT Y0
OUT T200 K65
LD T200
SET S20
RET
启动X0 停止X1正转Y0 反转Y1
LD X0
OR M0
OR T200
ANI X1
OUT M0
LDP M0
OR M1
ANI T1 K13
OUT M1
OUT T0 K2
LDP T0
OR M2
ANIT T2
OUT M2
OUT T1 K13
LDP T1
OR M3
ANI T3
OUT M3
OUT T2 K10
LD T2
OR M4
ANI T3
OUT T200 K65
LD M4
OUT Y0
LD M2
OUT Y1