一、控制要求及I/O分配
1.控制要求
隔灯闪烁:L1亮0.5秒后灭,接着L2亮0.5秒后灭,
接着L3亮0.5秒后灭,接着L4亮0.5秒后灭,接着L5、L9亮0.5秒后灭,接着L6、L10亮0.5秒后灭,接着L7、L11亮0.5秒后灭,接着L8、L12亮0.5秒后灭,L1亮0.5秒后灭,如此循环下去。
2.I/O分配
输入
输出
起动按钮:I0.0
L1:Q0.0
L5、L9:
Q0.4
停止按钮:I0.1
L2:Q0.1
L6、L10:Q0.5
L3:Q0.2
L7、L11:Q0.6
L4:Q0.3
L8、L12:Q0.7
图1-1
喷泉控制示意图
三、喷泉控制语句表
0 |
LD |
I0.0 |
16 |
TON |
T38,+5 |
31 |
LD |
M10.6 |
1 |
O |
M1.0 |
17 |
LD |
T38 |
32 |
= |
Q0.5 |
2 |
AN |
T37 |
18 |
= |
M0.0 |
33 |
LD |
M10.7 |
3 |
A |
I0.1 |
19 |
LD |
M0.0 |
34 |
= |
Q0.6 |
4 |
= |
M1.0 |
20 |
SHRB |
M10.0,M10.0,+8 |
35 |
LD |
M11.0 |
5 |
LD |
M1.0 |
36 |
= |
Q0.7 |
6 |
TON |
T37,+5 |
21 |
LD |
M10.1 |
37 |
LDN |
I0.1 |
7 |
LD |
T37 |
22 |
= |
Q0.0 |
38 |
R |
M10.1,8 |
8 |
O |
M11.0 |
23 |
LD |
M10.2 |
|
|
|
9 |
= |
M10.0 |
24 |
= |
Q0.1 |
|
|
|
10 |
LD |
I0.0 |
25 |
LD |
M10.3 |
|
|
|
11 |
O |
M0.1 |
26 |
= |
Q0.2 |
|
|
|
12 |
A |
I0.1 |
27 |
LD |
M10.4 |
|
|
|
13 |
= |
M0.1 |
28 |
= |
Q0.3 |
|
|
|
14 |
LD |
M0.1 |
29 |
LD |
M10.5 |
|
|
|
15 |
AN |
M0.0 |
30 |
= |
Q0.4 |
|
|
|
四、喷泉控制梯形图
图1-2
喷泉梯形图