用I0.1 启动,I0.5 复位
下面的程序可以做到单键进行自动及单步转换,在单步的状态可以用启动键进行单步动作执行
验证方法:将下面的程序copy到编程界面的STL目录中,将形成程序,再输出awl文件,在模拟器中执行
Network 1
LD M0.0
O M0.2
MOVB QB0, MB20
Network 2
LD M0.2
A I0.1
S M0.3, 1
Network 3
LDB<> MB10, MB20
A M0.0
O M0.3
TON T45, 30
Network 4
LDB= MB10, MB20
R M0.3, 1
Network 5
LD I0.1
LPS
TON T42, 300
AW>= T42, 250
S M0.2, 1
LPP
AN M0.2
ED
S M0.0, 1
Network 6
LD SM0.1
OB= MB10, MB20
EU
MOVB 31, MB10
Network 7
LD I0.5
EU
R M0.0, 7
R Q0.0, 8
MOVB 31, MB10
Network 8 // 网络标题
// 网络注释
LD T45
EU
LD I0.2
OW>= C1, 8
CTU C1, 1
Network 9
LD T45
MOVB MB20, MB10
Network 10
LDW= C1, 1
= Q0.1
Network 11
LDW= C1, 2
= Q0.2
Network 12
LDW= C1, 3
= Q0.3
Network 13
LDW= C1, 4
= Q0.4
Network 14
LDW= C1, 5
= Q0.5
Network 15
LDW= C1, 6
= Q0.6