一、目的
用PLC构成装配流水线控制系统
图1
装配流水线控制示意图
二、控制内容
1.
1.
控制要求
起动后,按以下规律显示:D→E→F→G→A→D→E→F→G→B→D→E→F→G→C→D→E→F→G→H→D→E→F→G→A……循环,D、E、F、G分别是用来传送的,A是操作1,B是操作2,C是操作3,H是仓库。
2.I/O分配
输入
输出
起动按钮:I0.0
A:Q0.0
E:Q0.4
复位按钮:I0.1
B:Q0.1
F:Q0.5
移位按钮:I0.2
C:Q0.2
G:Q0.6
D:Q0.3
H:Q0.7
2.
按图所示的梯形图输入程序。
图2
装配流水线梯形图
三、装配流水线控制语句表
0 |
LD |
I0.0 |
37 |
= |
M1.1 |
77 |
= |
Q0.3 |
1 |
O |
M0.0 |
38 |
TON |
T47,+50 |
78 |
LD |
M10.2 |
2 |
AN |
I0.1 |
39 |
LD |
M1.1 |
79 |
O |
M11.2 |
3 |
= |
M0.1 |
40 |
AN |
T47 |
80 |
O |
M12.2 |
4 |
LD |
M0.1 |
41 |
O |
M1.2 |
81 |
O |
M13.2 |
5 |
AN |
M0.0 |
42 |
= |
M20.0 |
82 |
= |
Q0.4 |
6 |
TON |
T37,+10 |
43 |
LD |
M20.4 |
83 |
LD |
M10.3 |
7 |
LD |
T37 |
44 |
TON |
T48,+80 |
84 |
O |
M11.3 |
8 |
= |
M0.0 |
45 |
AN |
T48 |
85 |
O |
M12.3 |
9 |
LD |
I0.2 |
46 |
= |
M1.2 |
86 |
O |
M13.3 |
10 |
O |
M2.0 |
47 |
LD |
M1.0 |
87 |
= |
Q0.5 |
11 |
AN |
T57 |
48
|
SHRB |
M20.0,M20.1,+4 |
88 |
LD |
M10.4 |
12 |
AN |
I0.1 |
89 |
O |
M11.4 |
13 |
= |
M2.0 |
49 |
LD |
M20.1 |
90 |
O |
M12.4 |
14 |
TON |
T57,+10 |
50 |
TON |
T39,+30 |
91 |
O |
M13.4 |
15 |
LD |
M2.0 |
51 |
LD |
T39 |
92 |
= |
Q0.6 |
16 |
O |
M0.5 |
52 |
TON |
T40,+15 |
93 |
LD |
M20.1 |
17 |
= |
M10.0 |
53 |
AN |
T40 |
94 |
AN |
T39 |
18 |
LD |
M0.2 |
54 |
= |
M0.2 |
95 |
= |
Q0.0 |
19 |
= |
M11.0 |
55 |
LD |
M20.2 |
96 |
LD |
M20.2 |
20 |
LD |
M0.3 |
56 |
TON |
T41,+30 |
97 |
AN |
T41 |
21 |
= |
M12.0 |
57 |
LD |
T41 |
98 |
= |
Q0.1 |
22 |
LD |
M0.4 |
58 |
TON |
T42,+15 |
99 |
LD |
M20.3 |
23 |
= |
M13.0 |
59 |
AN |
T42 |
100 |
AN |
T43 |
24 |
LD |
M0.0 |
60 |
= |
M0.3 |
101 |
= |
Q0.2 |
25 |
SHRB |
M10.0,M10.1,+5 |
61 |
LD |
M20.3 |
102 |
LD |
M20.4 |
62 |
TON |
T43,+30 |
103 |
AN |
T45 |
26 |
SHRB |
M11.0,M11.1,+5 |
63 |
LD |
T43 |
104 |
= |
Q0.7 |
64 |
TON |
T44,+15 |
105 |
LD |
I0.1 |
27 |
SHRB |
M12.0,M12.1,+5 |
65 |
AN |
T44 |
106 |
AN |
I0.0 |
66 |
= |
M0.4 |
107 |
R |
M20.1,4 |
28 |
SHRB |
M13.0,M13.1,+5 |
67 |
LD |
M20.4 |
108 |
R |
M10.1,28 |
68 |
TON |
T45,+30 |
109 |
R |
M1.1,1 |
29 |
LD |
M10.5 |
69 |
LD |
T45 |
|
|
|
30 |
O |
M11.5 |
70 |
TON |
T46,+15 |
|
|
|
31 |
O |
M12.5 |
71 |
AN |
T46 |
|
|
|
32 |
O |
M13.5 |
72 |
= |
M0.5 |
|
|
|
33 |
EU |
|
73 |
LD |
M10.1 |
|
|
|
34 |
= |
M1.0 |
74 |
O |
M11.1 |
|
|
|
35 |
LD |
M10.0 |
75 |
O |
M12.1 |
|
|
|
36 |
O |
M1.1 |
76 |
O |
M13.1 |
|
|
|