设有两台空压机,起动时按空压机主管道的压力上限、下限停止和起动。使用压力感应器与FX-4AD读取主管道压力,再与预设的压力值上、下限进行比较,再根据比较结果去控制两台空压机轮番走动,设Y0为1#空压机走动输出;Y1为2#空压机走动输出;Y2为1#空压机停止输出;Y3为2#空压机停止输出;Y4为报警输出。压力低时顺序走动1#、2#空压机并记录走动顺序;压力正常时则维持当前状态;压力高时则顺序停止先走动空压机。
程序如下:
LD M8002
MOV K120 D5
MOV K140 D6
LD M8000
TO K0 K0 H3330 K1
TO K0 K20 H0 K1
FROM K0 K9 D8 K1
LD M8000
ZCP D5 D6 D8 M10
LD M10
OUT T0 K30
LD M8002
ZRST M30 M31
LD M8002
OR M31
SET M1
LD M30
RST M1
LD M8013
AND T0
ANI M12
ANI M4
OUT M2
LD M2
SFTL M1 M30 K2 K1
LD M30
OUT T1 K30
ANI X002
ANI T1
OUT Y000
LD M31
OUT T2 K30
ANI X003
ANI T2
OUT Y001
LD Y000
OR Y001
ANI M50
OUT M4
OUT T5 K1800
LD T5
OR M50
OUT T6 K5
ANI T6
OUT M50
LD M8002
RST D11
LD M2
MOV K1M30 D10
LD M2
SFWR D10 D11 K3
LD M12
OUT T7 K30
LD M8013
AND T7
ANI M10
ANI M5
OUT M3
LD M3
SFRD D11 D15 K3
LD M8000
MOV D15 K1M15
LD M15
OR X002
OUT T10 K30
ANI T10
OUT Y002
LD M16
OR X003
OUT T11 K30
ANI T11
OUT Y003
LD Y002
OR Y003
ANI M51
OUT M5
OUT T12 K1800
LD T12
OR M51
OUT T16 K5
ANI T16
OUT M51
LD M8000
OUT M8049
LD X002
OR X003
ANS T17 K30 S900
LD Y000
ANI X000
LD Y001
ANI X001
ORB
ANS T18 K50 S901
LD Y002
AND X000
LD Y003
AND X001
ORB
ANS T19 K300 S902
LD M8048
OUT Y004
LDP X004
ANR
END
我花了好几天都不能完善它,实在没有办法了,请哪位高手帮帮忙!