Date,2009-7-30
File,SSP1_08C.1
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
位指令
I0.0 I0.1 Q 8.0
Q 8.1
SRS Q
R
I1.2
I1.3
M0.0
Q 9.3
I 1.0
( MCR< )
(MCRA)
Q 8.0
I 0.0
I 1.1
( )
Date,2009-7-30
File,SSP1_08C.2
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
L1
(Q 4.0)
S1 (I 0.0)
S2 (I 0.1)
L2
(Q 4.1)
电路图基本逻辑指令:与,或
I 0.2
I 0.3
>=1 =Q 4.2 O I0.2O I0.3
= Q 4.2
I0.0 I0.1 Q 4.0
Q 4.1
LAD
=
Q 4.0&I 0.0
I 0.1
=
Q 4.1
FBD
A I0.0
A I0.1
= Q 4.0
= Q 4.1
STL
I0.2
I0.3
Q 4.2
L3 (Q 4.2)
S3
(I 0.2)
S4
(I 0.3)OR
AND
Date,2009-7-30
File,SSP1_08C.3
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
基本逻辑指令:异或 (XOR)
X I0.4
X I0.5
= Q4.0
I 0.4
I 0.5
XOR =Q4.0
I0.4 I0.5
I0.4 I0.5
Q 4.0
LAD
>=1 =Q 4.0
&I 0.4
I 0.5
&I 0.4
I 0.5
FBD STL
A I0.4
AN I0.5
O
AN I0.4
A I0.5
= Q4.0
Date,2009-7-30
File,SSP1_08C.4
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
逻辑操作结果,首次检查,举例
A I 1.0
AN I 1.1
A M 4.0
= Q 4.0
= Q 4.1
A I 2.0
例 1
信号状态
0
0
0
0
检查结果逻辑操作结果首次检查 信号状态 检查结果逻辑操作结果首次检查
1
例 2
1
1
1
信号状态 检查结果逻辑操作结果首次检查
1
例 3
0
1
0
Date,2009-7-30
File,SSP1_08C.5
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
常开和常闭触点,传感器和符号输入端的信号状态检查信号状态,1”
符号 /
指令检查结果检查信号状态,0”
符号 /
指令检查结果有输入端有电压吗?
无有无
1
0
1
Yes
1
LAD:
常开触点
0
&
FBD:
A I x.y
STL:
AN I x.y
STL:
&
FBD:
LAD:
常闭触点
No
0
Yes
1
No
0
No
0
Yes
1
Yes
1
No
0
过程 PLC程序中的解释动作不动作传感器是,..
动作不动作常开触点传感器是,..
常闭触点
Date,2009-7-30
File,SSP1_08C.6
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
练习 8.1:常开点与常闭点任务:当 S1 动作和 S2 不动作时,在所有三个例子中灯应该点亮 !
I1.0 I1.1 Q 4.0 I1.0 I1.1 Q 4.0
......,I1.0
......,I1.1
......,Q 4.0
Q 4.0
I 1.0
I1.1
&
Q 4.0
I1.0
I1.1
&
Q 4.0
I1.0
I1.1
&
......,I1.0
......,I1.1
......,Q 4.0
......,I1.0
......,I1.1
......,Q 4.0
软件
I1.0
S1
I1.1
S2
I1.0
S1
I1.1
S2
I1.0
S1
I1.1
S2
Q 4.0
可编程控制器
LightLight Light
Q 4.0
可编程控制器
Q 4.0
可编程控制器
FDB
STL
LAD
硬件
I 1.0 I 1.1 Q 4.0
I 1.0 I 1.1 1.0 1.1 1.0 1.1
Date,2009-7-30
File,SSP1_08C.7
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
赋值,置位,复位
(S)Q 4.1
I 1.2 I 1.3 I 1.2
&
S
Q 4.1
I 1.3
A I 1.2
A I 1.3
S Q 4.1置位
(R)Q 4.1
I 1.4
I 1.4 >=1
R
Q 4.1
I 1.5
O I 1.4
O I 1.5
R Q 4.1复位 I 1.5
( )
Q 4.0I 1.0 I 1.1 I 1.0 &
=
Q 4.0
I 1.1
A I 1.0
A I 1.1
= Q 4.0赋值
LAD FBD STL
Date,2009-7-30
File,SSP1_08C.8
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
触发器的置位 / 复位
SR
R Q
SI1.2
I1.3
M0.0
=
Q5.3
复位优先
SRS Q
R
I1.2
I1.3
M0.0
Q 5.3 A I 1.2S M 0.0
A I 1.3
R M 0.0
A M 0.0
= Q 5.3
RS
S Q
RI1.3
I1.2
M0.0
=
Q5.3
置位优先
RSR Q
S
I1.3
I1.2
M0.0
Q 5.3 A I 1.3R M 0.0
A I 1.2
S M 0.0
A M 0.0
= Q 5.3
LAD FBD STL
Date,2009-7-30
File,SSP1_08C.9
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
连接器
LAD
I 1.0 I 1.1
( )
M0.0 I 2.0 I 2.1
( )
M 1.1
NOT ( )
Q 4.0
A I 1.0
A I 1.1
= M 0.0
A M 0.0
A I 2.0
A I 2.1
NOT
= M 1.1
A M 1.1
= Q 4.0
STL
I 1.0
I 1.1
&
&
I 2.0
I 2.1
M0.0
M1.1 Q 4.0
=
FBD
Date,2009-7-30
File,SSP1_08C.10
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
练习 8.2,基本逻辑操作指令
Date,2009-7-30
File,SSP1_08C.11
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
影响 RLO的指令
LAD FBD STL
A I0.0
A I0.1
NOT
= Q4.0=
Q4.0&I0.0
I0.1( )
Q4.0
NOT
I0.0 I0.1NOT
Status word
15 8 1
BR RLO
不存在 不存在CLR CLR
不存在 不存在SET SET
I1.6
( SAVE ) SAVE&I1.6SAVE A I1.6SAVE
=
Q4.1
BR
BR
( )
Q4.1BR A BR
= Q 4.1
Date,2009-7-30
File,SSP1_08C.12
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
主控继电器功能
MCR<&A0.0
MCRA
S&A0.4
Q8.0
MCR>
& =M5.5 M69.0I 2.7
MCRD
& =A0.7
Q4.5
M0.6
=
FBD
MCRA // 激活
A I0.0 // 允许 MCR
MCR( // 打开 MCR
A I0.7 // NO 触点
= Q4.5 // 输出线圈
= M0.6 //输出线圈
A I0.4 // NO 触点
S Q8.0 // 置位输出
)MCR // 关闭 MCR
AN M5.5 // 紧急触点
AN I 2.7 // 紧急触点
= M69.0 // 输出线圈
MCRD // 取消
STLLAD
( MCRA )
I0.7 ( )Q4.5
( )
M0.6
I0.4 ( S )Q8.0
( )
M69.0 I 2.7M5.5
( MCR< )
( MCRD )
( MCR> )
I0.0
Date,2009-7-30
File,SSP1_08C.13
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
无条件跳转 (不依赖于 RLO)
( JMP )
NEW1Network 1
Network 2
:
:
:
:
Network x
NEW1
( )
M69.0I 2.7M5.5
LAD
NEW1
JMP....
NEW1
&M5.5
I 2.7 =
M69.0
Network 1
Network 2
:
:
:
:
Network x
FBD
Network 1
JU NEW1
Network 2
:
:
:
:
Network x
NEW1,AN M5.5
AN I 2.7
= M69.0
STL
Date,2009-7-30
File,SSP1_08C.14
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
条件跳转 (依赖于 RLO)
A I0.0
A I0.1
JC NEW1
NEW1I 0.0 I 0.1 &I0.0
I0.1 JMP
NEW1(
JMP)如果 RLO=1就跳转
A I0.2
A I0.3
JCN NEW2JMPN
I0.2
I0.3
NEW2NEW2I 0.2 I 0.3如果 RLO=0就跳转
(JMPN)
&
LAD FBD STL
Date,2009-7-30
File,SSP1_08C.15
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
RLO - 边沿检测
P
I1.0 I1.1 M1.0 M8.0
N
I1.0 I1.1 M1.1 M8.1
LAD
I1.0
I1.1 P =
& M1.0 M8.0
I1.0
I1.1 N =
& M1.1 M8.1
FBD
A I1.0
A I1.1
FP M1.0
= M8.0
A I 1.0
A I 1.1
FN M1.1
= M8.1
STL
I1.0
I1.1
RLO
M1.0
M8.0
M8.1
M1.1
OB1-循环例如
Date,2009-7-30
File,SSP1_08C.16
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
信号 - 边沿检测
I1.1
=
M8.0POS
M_BITM1.0
&I1.0
I1.1
=
M8.1NEG
M_BITM1.1
&I1.0
FBD
A I1.0
A (
A I1.1
FP
M1.0
)
=
M8.0
A I1.0
A (
A I1.1
FN
M1.1
)
=
M8.1
STL
I1.1 M8.0
POS
M_BITM1.0
Q
I1.0
I1.1 M8.1
NEG
M_BITM1.1
Q
I1.0
LAD
例如
I1.0
I1.1
M1.0
M8.0
M8.1
M1.1
OB1-周期
Date,2009-7-30
File,SSP1_08C.17
SIMATIC S7
Siemens AG 2000,All rights reserved.
Information and Training Center
Know ledge for Automation
练习 8.3,灌装线编程 (模式选择 )
Q 8.5 传送带向前
Q 8.6 传送带向后瓶子传感器
I 8.6
I 0.0 =
I 0.1 =
启动 (瞬态常开触点开关 )
停止 (瞬态常闭触点开关 )
设备 ON/OFF:
I 0.4 = 手动 /自动 (开关 )
接受模式 (瞬态常开触点开关 )
手动 /自动模式:
I 0.5 =
I 0.2 = 向前点动 (瞬态常开触点开关 )
向后点动 (瞬态常开触点开关 )I 0.3 =
M