拨动“停止旋钮”灯泡完成当前周期循环后熄灭。
材料:
1 plc
2 开关电源 24VDC
3控制按钮(旋转的那种) 2个
4软导线若干
5中间继电器 如果灯泡功率大的话应给每个输出作继电器隔离
NETWOEK1
LDW= T32, 12000 //
A M0.5
LDI0.0 //开始旋钮
EU
OLD
A I0.1//停止旋钮
S M0.0, 1
R M0.5, 1
NETWOEK2
LAW=T32, +1000
S M0.1, 1
NETWOEK3
LD M0.1
AW=T32, +2000
S M0.2, 1
R M0.1, 1
NETWOEK4
LD M0.2
AW=T32, +3000
S M0.3, 1
R M0.2, 1
NETWOEK5
LD M0.3
AW=T32, +4000
S M0.4, 1
R M0.3, 1
NETWOEK6
LD M0.4
AW=T32, 9000
S M0.5, 1
R M0.4, 1
NETWOEK7
LD M0.0
EU
R T32, 1
S M8.1, 1
NETWOEK8
LD M8.1
TONT32, +12000
NETWOE9
LD M0.0
S Q0.0, 1
NETWOEK10
LD M0.1
S Q0.1, 1
NETWOEK11
LD M0.2
S Q0.2, 1
NETWOEK12
LD M0.3
S Q0.3, 1
NETWOEK13
LD M0.4
S Q0.4, 1
NETWOEK14
LD M0.5
R Q0.0, 5
TITLE=程序注释Network 1
LD I0.1
R Q0.0, 8
Network 2 // 网络标题
// 网络注释
LD I0.0
O M0.0
AN I0.1
= M0.0
AN T33
TONT33, 3200
Network 3
LD M0.0
AW>= T33, 0
S Q0.0, 1
Network 4
LDW>= T33, 100
S Q0.1, 1
Network 5
LDW>= T33, 200
S Q0.2, 1
Network 6
LDW>= T33, 300
S Q0.3, 1
Network 7
LDW>= T33, 400
S Q0.4, 1
Network 8
LDW>= T33, 500
S Q0.5, 1
Network 9
LDW>= T33, 600
S Q0.6, 1
Network 10
LDW>= T33, 700
S Q0.7, 1
Network 11
LDW>= T33, 800
R Q0.0, 8
Network 12
LDW>= T33, 900
S Q0.0, 8
Network 13
LDW>= T33, 1000
R Q0.0, 8
Network 14
LDW>= T33, 1100
S Q0.0, 8
Network 15
LDW>= T33, 1200
R Q0.0, 8
Network 16
LDW>= T33, 1300
S Q0.0, 8
Network 17
LDW>= T33, 1400
R Q0.7, 1
Network 18
LDW>= T33, 1500
R Q0.6, 1
Network 19
LDW>= T33, 1600
R Q0.5, 1
Network 20
LDW>= T33, 1700
R Q0.4, 1
Network 21
LDW>= T33, 1800
R Q0.3, 1
Network 22
LDW>= T33, 1900
R Q0.3, 1
Network 23
LDW>= T33, 2000
R Q0.2, 1
Network 24
LDW>= T33, 2100
R Q0.1, 1
Network 25
LDW>= T33, 2200
R Q0.0, 1
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)