西门子基本指令的介绍

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

2013-3-23 SSP1_08C.1
Information and Training Center Knowledge for Automation
, 或 基本逻辑指令:与 基本逻辑指令:与,
电路图
LAD
FBD
STL
S1 (I 0.0) I0.0 AND S2 (I 0.1) Q 4.1 I0.1 Q 4.0 I 0.0 I 0.1 & Q 4.0 = Q 4.1 = A A = = I0.0 I0.1 Q 4.0 Q 4.1
+
8 + 4
+
1
数据类型 整型 例如 205
31
24 23
16 15
8 7
0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
指数(8位) 符号位
尾数(23 位)
数据类型 实数 例如 45.6789
SIMATIC S7
Siemens AG 2000. All rights reserved.
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Date: File:
2013-3-23 SSP1_08C.4
Information and Training Center Knowledge for Automation
练习8.1:常开点与常闭点
任务:当 S1 动作和S2 不动作时,在所有三个例子中灯应该点亮 ! 硬件 S1 I1.0 I 1.0
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.10
Information and Training Center Knowledge for Automation
依赖于 RLO) 条件跳转 ( (依赖于
Date: File:
2013-3-23 SSP1_08C.13
Information and Training Center Knowledge for Automation
数据格式 (16 位)
PG
符号 (+) 2
CPU
9 6
BCD
正数
W#16#296
0 0 0 0 0 0 1 0 1 0 0 1 0 1 1 0
可编程控制器
S2 I1.1 I 1.1 Q 4.0
Light
S1 I1.0 I 1.0
可编程控制器
S2 I1.1 I 1.1 Q 4.0
Light
S1 I1.0 I 1.0
可编程控制器
S2 I1.1 I 1.1 Q 4.0
Light
软件 I 1.0 I 1.1 Q 4.0
I1.0
I1.1
Q 4.0
I1.0
数据格式
十进制 数 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
BCD 数 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001
15 0 0 0 0 0 0 0
8 0
7 1 1 0 0 1 1 0
0 1
十进制值: 符号位
128 + 64
LAD
FBD
STL
如果RLO=1 就跳转
I 0.0
I 0.1
NEW1
I0.0 I0.1
&
(JMP)
NEW1 JMP
A I0.0 A I0.1 JC NEW1
如果RLO=0 就跳转
I 0.2
I 0.3
NEW2
I0.2 I0.3
&
(JMPN)
NEW2 JMPN
A I0.2 A I0.3 JCN NEW2
Information and Training Center Knowledge for Automation
不依赖于 RLO) 无条件跳转 ( (不依赖于
LAD
FBD
STL
Network 1
NEW1
Network 1
( JMP )
Network 2 : : : : Network x NEW1
>=1
Q 4.1 R
O I 1.4 O I 1.5 R Q 4.1
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.6
Information and Training Center Knowledge for Automation
A I A I = M A M A I A I NOT = M A M = Q
1.0 1.1 0.0 0.0 2.0 2.1 1.1 1.1 4.0
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.8
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.11
Information and Training Center Knowledge for Automation
数字指令
M0.0
CMP ==I IN1 IN2
L1 (Q 4.0)
L2 (Q 4.1)
S3 (I 0.2) OR S4 (I 0.3)
I0.2
Q 4.2 I 0.2 >=1 I 0.3
Q 4.2 =
I0.3
O O =
I0.2 I0.3 Q 4.2
L3 (Q 4.2)
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.2
Information and Training Center Knowledge for Automation
XOR) 基本逻辑指令:异或 ( (XOR)
LAD
FBD
STL
I 0.4 I0.4 I0.5 Q 4.0 I 0.5 I 0.4 I0.4 I0.5 I 0.5
....
Network 2 : : : : Network x NEW1
NEW1 JMP
Network 1
JU NEW1
Network 2 : : : : Network x
M5.5
I 2.7
M69.0
( )
M5.5 I 2.7
&
NEW1: M69.0
=
AN M5.5 AN I 2.7 = M69.0
Q 5.7
IW0 IW2
I0.7
S
T4 S_ODT
Q BI BCD TV R
Q4.5 MW0 QW6
S5T#35s I0.5
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.12
Information and Training Center Knowledge for Automation
Information and Training Center Knowledge for Automation
8.2: 基本逻辑操作指令 练习 练习8.2:
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.9
I1.1
Q 4.0
LAD
I 1.0
& Q 4.0
I1.0 I1.1
& Q 4.0
I1.0 I1.1
& Q 4.0
FDB
I1.1 ....... I1.0 ....... I1.1 ....... Q 4.0
STL
....... I1.0 ....... I1.1 ....... Q 4.0
....... I1.0 ....... I1.1 ....... Q 4.0
& >=1 & Q 4.0 =
A AN O AN A =
I0.4 I0.5 I0.4 I0.5 Q4.0
I 0.4 I 0.5
XOR
Q4.0 =
X X =
I0.4 I0.5 Q4.0
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.3
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
整数
0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 +296 28
= 256 + 符号 (-)
25
23
= = 32 + 8 = 296
4
1
3
BCD
负数
W#16#F413 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 1
位指令
I0.0
I0.1
Q 8.0 Q 8.1 I 0.0 ( MCR< ) I 1.0 I 1.1 Q 8.0 ( ) (MCRA)
I1.2 S I1.3 R
M0.0 SR Q 9.3 Q
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
常开 触点
动作 有 1
LAD:
常开触点
Yes 1
LAD:
常闭触点
No 0
不动作

0
FBD:
常闭 触点 动作 无 & 0
No 0
FBD:
&
Yes 1Biblioteka Baidu
No 0
Yes 1
不动作

1
STL:
A I x.y
Yes 1
STL:
AN I x.y
No 0
SIMATIC S7
Siemens AG 2000. All rights reserved.
I 1.0
I 1.1
Q 4.0
赋值
( )
I 1.0 I 1.1
&
Q 4.0 =
A I 1.0 A I 1.1 = Q 4.0
I 1.2
I 1.3
Q 4.1
置位
(S)
I 1.2 I 1.3
&
Q 4.1 S
A I 1.2 A I 1.3 S Q 4.1
I 1.4
Q 4.1
(R)
复位
I 1.5
I 1.4 I 1.5
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.5
Information and Training Center Knowledge for Automation
赋值,置位,复位
LAD FBD STL
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 整数 -413
- (412 + 1) = - 413
28 27
= = 256+ 128 +
24 23 22
= = = 16+8+ 4 = 412
SIMATIC S7
Information and Training Center Knowledge for Automation
连接器
LAD
STL
I 1.0
I 1.1
M0.0
I 2.0
I 2.1 NOT
M 1.1
Q 4.0
( )
( )
( )
FBD
I 1.0 I 1.1
& M0.0 & I 2.0 I 2.1 M1.1 Q 4.0 =
M0.0 RS Q 5.3 Q I1.3 R
M0.0 RS Q5.3 I1.2 S Q =
A R A S A =
I 1.3 M 0.0 I 1.2 M 0.0 M 0.0 Q 5.3
SIMATIC S7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.7
Siemens AG 2000. All rights reserved.
Date: File:
2013-3-23 SSP1_08C.14
Information and Training Center Knowledge for Automation
数据格式 (32 位)
BCD DW#16#296 符号 (+) 0 0 0 0 2 9 6
触发器的置位 / 复位
LAD
M0.0 S I1.3 R I1.3 R SR Q 5.3 Q I1.2 S
FBD
M0.0 SR Q5.3 Q =
STL
I1.2 复位 优先
A S A R A =
I 1.2 M 0.0 I 1.3 M 0.0 M 0.0 Q 5.3
I1.3 置位 优先 I1.2 S R
Information and Training Center Knowledge for Automation
常开和常闭触点,传感器和符号
过程 PLC程序中的解释
传感器 是 ...
传感器 是 ...
输入端 有电压 吗?
输入端 的信号 状态
检查信号状态“1” 符号 / 指令 检查 结果
检查信号状态“0” 符号 / 指令 检查 结果
相关文档
最新文档