PLC基本指令与编程2
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
OUT Y4
MPP
AND X7
OUT Y5
MPSMPP
1111
2. MC/MCR
MCMaster Control MCMC
MCR (Master Control Reset) MC MCR
3-6
X0
M10 X1
T0
3-7
MC N1 M10
T0 K10
Y1
MCR N1
X2 Y2
LD X0 MC N1 M10 LD X1 OUT T0 K10 LD T0 OUT Y1 MCR N1 LD X2 OUT Y2
116C0C199 200C0C99 C100C199100
X0 C0 X1
C0 K5
Y0
RST C0
X1 X0
01 23 4 5
Y0
X1 RST C0
X2
C0
K5
C0
Y0
X3
C1
D1
LD X1 RST C0 LD X2 OUT C0 K5 LD C0 OUT Y0
LD X3 OUT C1 D1
4PLC 5 6PLCRUN
SW SW SW
1.
a
b
LDI X1
LD X0
LD X0
OR Y0
OR Y0
ANI X1
ANB
LD X2
LD X2
ANI X3
ANI X3
AN4 X4
AN4 X4
ORB
ORB
OUT Y0
OUT Y0
2.
X0 X1 X4 X5
Y0
X2 X3
Y0
2.4
1 MPS/MRD/MPP
COM
220V
3 4
X0 X1 X2 Y1
Y1
Y3 T1 Y2
T1
T1
Y2
K20
Y3
Y3
a2-36
X2
X0 X1
Y1
Y1
Y3
T1
T1
Y1 Y2
Y3
b
Y1
T1 K20
Y2 Y3
221 1
1
2
3 415s 5
2I/O
(I)
(O)
SB0 SB1 SB2 SB3 SB4 SB5 SB6 HL0 HL1
KMK2M3
FU2
FR
SB1 KM1
SB2
KM3
KKMM2 3
KT
KM1 FU2
KM2
KT KM3
KM2
KT
KM3
1 QSSB2KM1
KM2KTKM1KM2Y KTKM2 KTKM3KM1KM3 Y-
L1 L2 L3
FU2
QS FU1
KM1
. . . FR
M
.3~
KMK2M3
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3Y0X1
X1
Y0
M2
END
Y1
Y2
Y3
Y0 T0
K150 Y4 T1
K5 T2
K5 M0
M1
M2
3. SFC
SFC
.
M8002
1
1 2
2 3
1 2
3
12-9 1 2 3 4
2
7 2-17
2.IL
PLC+
Y0 T0
X0
T0
X1
Y1
T0 K20
Y0
Y1
LD Y0 ANI T0 OR X0 OUT T0
K20 OUT Y0 LD T0 OR Y1 ANI X1 OUT Y1
ABC SB1SB2SB3HL1--HL3 SW SW
1I/OI/O.
SB1
X0
SB2
X1
MCMCR 1MCMCRYM
MC3MCR2 2
M10 LDLDI
3MCMCMCR / OUT X0T0Y1OFF
4MCMC 8N0N7MCR N7N0
3.LDP/LDF,ANDP/ANDF,ORP/ORF)
3-8
LDP
LDF
ANP
ANF
ORP
ORF
XYMSTC
2
XYMSTC
X0
T220010ms K150 Y0 150�0.01s=1.50sX0 X0 T220 0 Y0 Y0OFF
X0 T220
T220 K150
Y0
1.50s
LD X0
OUT T220 K150
LD T220
OUT Y0
2.5 TC
X0
T0
TX01
K10
Y0
t<1s
1s
X0
Y0
2
X0 X1 X2 C200
M8200
RST C200
C200 K-5
Y0
X0
X1
X2
C200 0 1
23
4
5
43
2
10
0
-1 -2 -3 -4 -5 -6 -7 -6 -5 -4 -3 -2 -1
Y0
2C235C255
X0X7 X6X7
1/C235C240 2/C241C245 3C246C250 4(A-B)C251C255
Y0
LD X0
LD X0
X2 X3
ANI X1 LDI X2
ANI X1 LDI X2
X4 X5
AND X3 ORB
AND X3 LD X4
LD X4
AND X5
AND X5
ORB
ORB
ORB
OUT Y0
OUT Y0
X0 X1 X2 Y0
X3 X4 X5
X6
X7
Y0
LD X0 ANI X1 LDI X3 AND X4 ORB LD X2 OR X5 ANB LD X6 ANI X7 ORB OR Y0
2.5
1.
PLC PLC
(1) (2)PLCI/O PLCI/O PLC
(3) PLC
23PLC
1PLC
2PLC PLCPLCPLC PLC
3PLC 4PLC "" (4) """ """
(5)
2.
Y-
L1 L2 L3
QS FU1
KM1
. . . FR
M
.3~
M1
LD M1
SET Y1
SET Y1
X2
LD X2
PLF M2
PLF M2
M2
LD M2
RST Y1
RST Y1
X1
a
X2
M1
M2
Y1
b
8. NOP
NOPNON processing NOP
9. END
ENDEnd
ENDPLC END PLCEND
END END
2.3
1. LD 1
:
Y0 T0
X0
T0
X1
Y1
T0 K20
Y0
Y1
----""
PLC PLC
I/O
PLC
3
1
2""
3
X1 X2
X3 X4 X5
XX14 X3
X2
X4
XX41 X3
X5
XX14
4
5
X1 X2 Y0
X3 X4 Y1
X1
X2
Y0
X3
X1
X4
Y1
X3
6 2-16
RST Y1
Y1
a
b
2 X0X1
X0
X0
X1
Y0
X1
Y0
SET Y0 RST Y0
a
Y0
X1
Y0
X0
c
X0 X1 X0
SET Y0 RST Y0
b
d
7. PLSPLF
PLSPulse PLF
PLSPLF 1PLSPLF
2PLSPLF
PLSPLFSETRST
X1
LD X1
PLS M1
PLS M1
6. SETRST
SET RSTReset
1SETYMS "1"
RSTYMSTCDVZY MS"0"TCD VZ
2SETRST
1
X1
X1
SET M1
LD X1
X2
X2
SET M1
RST M1
LD X2
M1
RST M1
X3
LD X3 X3
SET Y1
SET Y1
X4
LD X4 X4
RST Y1
X1X1ONC0X2 X21X1 5C0 Y0X2 X1RST Y0
2 32/C200C2342147483648+21474836473532/ C200C21920C220C23415
K DC200C234
M8200M8234"1" "0"2-9
X10M8200X10X12C200 5C200M8200OFFX12 455ON 54OFF4 OFFX110
2. PLC
2.1
1.XY
1
XX0 X17789
2
YY0 Y17789
2. (M)
PLC
1 M0M499
2
PLC 3 M8000M8255C
M8000 PLC M8002 PLC M8012 100ms M8013 1s M8033 PLC M8034
XYM
X0 Y0
X1 M0
2. ANDANI
ANDAnd:
ANIAnd Inverse:
XYMSTC
X0 X1 X2 Y0
X3 X4 X5 Y1
Y0 Y1 Y2
Y3
LD X0 ANI X1 AN1 X2 OUT Y0 LDI X3 AND X4 AND X5 OUT Y1 LD Y0 AND Y1 OUT Y2 OUT Y3
16V0V7Z0Z716
10.P/I
1P P0P127CJ CALL
2I I0 I8
2.2
1. LDLDIOUT
LDload:
LDIload Inverse:
XYMSTC
OUT(out):
YMSTCX
X0 Y0
LD X0 OUT Y0
X1 M0
M0 Y1
Y2
LDI X1 OUT M0 LD M0 OUT Y1 OUT Y2
3. ORORI
OROr ORIOr Inverse XYMSTC
X0
X1
Y0
X2
X3
LD X0 OR X2 ORI X3 ANI X1 OUT Y0
4. ANB
ANBAnd Block 1
X0 X1 X2 X3 X4 X5
Y0 LD X0
ORI X3 LDI X1 OR X4 ANB LD X2 OR X5 ANB OUT Y0
MPS
MRD
MPP
3-43-5
LD X0 MPS
X0 MPS X1 Y0
AND X1 OUT Y0 MPP
X2 MPP
Y1
AND X2 OUT Y1
X3 MPS X4 Y2
X5 MRD
Y3 X6 MRD
Y4
X7 MPP
Y5
LD X3 MPS ANI X4 OUT Y2 MRD AND X5 OUT Y3 MRD ANI X6
LD X0 ORI X3 LDI X1 OR X4 LD X2 OR X5 ANB ANB OUT Y0
2
X0 X1 X2 X3
X4