SIMATIC S7 培训教材-8.数字指令

上传人:飞*** 文档编号:46209618 上传时间:2018-06-23 格式:PPT 页数:36 大小:1.04MB
返回 下载 相关 举报
SIMATIC S7 培训教材-8.数字指令_第1页
第1页 / 共36页
SIMATIC S7 培训教材-8.数字指令_第2页
第2页 / 共36页
SIMATIC S7 培训教材-8.数字指令_第3页
第3页 / 共36页
SIMATIC S7 培训教材-8.数字指令_第4页
第4页 / 共36页
SIMATIC S7 培训教材-8.数字指令_第5页
第5页 / 共36页
点击查看更多>>
资源描述

《SIMATIC S7 培训教材-8.数字指令》由会员分享,可在线阅读,更多相关《SIMATIC S7 培训教材-8.数字指令(36页珍藏版)》请在金锄头文库上搜索。

1、Date:* File:SSP1_09C.1SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowledge for Automation数字指令CMP =IIN1 IN2IW0 IW2M0.0Q 5.7T4 S_ODTTVSQBCDBIRI0.7I0.5S5T#35sQ4.5MW0QW6Date:* File:SSP1_09C.2SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Cen

2、ter Knowledge for Automation数据格式十进制 BCD 数 数00000 10001 20010 30011 40100 50101 60110 70111 81000 91001 10 11 12 13 14 15110011017000000001580128 +64841符号位数据类型 整型 例如 205+十进制值:0701580 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 023163124指数(8位)尾数(23 位)数据类型 实数 例如 45.6789符号位Date:* File:SSP1_

3、09C.3SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowledge for Automation数据格式 (16 位)BCD整数BCD28 = 256 +0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 025 = 32 +23 = 8 = 2960 0 0 0 0 0 1 0 1 0 0 1 0 1 1 0296符号 (+)1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 141

4、3符号 (-) W#16#F41327 = 128 +1 1 1 1 1 1 1 0 0 1 1 0 0 0 1115 14 13 12 11 10 9 8 7 6 5 4 3 2 1 023 = 8+22 = 4 = 412 28= 256+24= 16+- (412 + 1) = - 413 负数整数正数W#16#296+296-413PGCPUDate:* File:SSP1_09C.4SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowledge for Automati

5、on数据格式 (32 位)实数 = +1,5 * 2 126-127 = 0,75DW#16#296L#+296+0.75或 +7.5 E-10 0 0 0 0 0 0 1 0 0 1 0 1 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 015 14 13 12 11 10 9 8 7 6 5 4 3 2 1 031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 1628 = 256 +25 = 32 +23 = 8 = 296整数 (32 位) =00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 1 1 1

6、 1 1 1 0 1 00 0 0 0实数 符号15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 031 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16e = 指数 (8 Bit)f = 底数 (23 Bit)实数的通用格式 = (Sign) (1.f) (2e-127)20212223242526272-232-12-22-4 .2-30 0 0 0000符号 (+)00 0 00 0 1 0 1 0 0 1 0 1 1 029600 0 00 0 00 0 0 000BCDDINTREALDate:* File:SSP1_09

7、C.5SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowledge for Automation装载 举例数据装入和传递 (1)L +5/16-位常数 (整数)L L#523123/32-位常数 (双整数)L B#16#EF/十六进制字节L 2#0010 0110 1110 0011/16-位二进制值L 3.14/32-位常数 (实数)MOVEENINOUTENOMB55FBDL+5TMB5STLMOVEENOUTENOMB5LADIN5Date:* File:SSP1_09C

8、.6SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowledge for Automation数据装入和传递(2)00000000: : L W#16#CAFEL W#16#AFFE : : :XXXXXXXXCAFEAFFEACCU2 内容ACCU1 内容程序YYYYYYYYXXXXXXXX0000CAFEDate:* File:SSP1_09C.7SIMATIC S7 Siemens AG 2000. All rights reserved.Information and

9、Training Center Knowledge for Automation数据装入和传递(3)312315700 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0MB0312315700 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0MB1MB031231570MB3MB2MB0MB1装载L MB 0程序T QD 4QD 4QW 4QB 4传递ACCU1内容L MW 0L MD 0T QW 4T QB 4Date:* File:SSP1_09C.8SIMATIC S7 Siemens AG 2000. All rights reser

10、ved.Information and Training Center Knowledge for AutomationLADSTL示例: 输入延时 S_ODTAI0.7 LS5T#35s SD T4 AI0.5 RT4 LT4 TMW0 LC T4 TMW2 AT4 =Q8.5定时器概述Date:* File:SSP1_09C.9SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowledge for Automation定时器:接通延时 (SD)LADT4 S_ODTTVSQB

11、CDBIRI0.7I0.5S5T#35sQ4.5MW0QW6FBDS_ODTTVQBIRI0.7I0.5S5T#35sMW0QW6T4BCD=Q4.5SSTLAI0.7 LS5T#35s SD T4 AI0.5 RT4 LT4 TMW0 LC T4 TQW6 AT4 =Q4.5例如S处的RLO R处的RLO 定时器 操作Q时间值: 0 . . . 9990,01s = 1Q4.0Date:* File:SSP1_09C.21SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowle

12、dge for AutomationSTEP 7中的S5计数器STLAI0.4 CUC5 AI0.5 CDC5 AI0.3 LC#20 SC5 AI0.7 RC5 LC5 TMW4 LCC5 TQW6 AC5 =Q4.3LADFBDQI 0.4I 0.5CUI 0.7C#20S_CUDCDSI 0.3PVRQ 4.3CVCV_BCDMW 4QW 6C5QQI 0.4I 0.5CUI 0.7C#20S_CUDCDSI 0.3PVRQ 4.3CVCV_BCDMW 4QW 6C5=QDate:* File:SSP1_09C.22SIMATIC S7 Siemens AG 2000. All righ

13、ts reserved.Information and Training Center Knowledge for Automation计数器:位指令STLAI0.0LC#20 SC5AI0.1 CU C5AI0.2CD C5AC5= Q 4.0LADI0.0C5SCC#20Network 1:C5Network 2:I0.1CUNetwork 3: I0.2C5CDNetwork 4: C5Q 4.0FBDSCC5I0.0C#20CVCUC5I0.1CDC5I0.2=Q 4.0C5Date:* File:SSP1_09C.23SIMATIC S7 Siemens AG 2000. All r

14、ights reserved.Information and Training Center Knowledge for Automation计数器:功能图CUCDSRQ计数543210Date:* File:SSP1_09C.24SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowledge for Automation比较指令STLAM0.0 A ( LIW0 LIW2 =I ) =Q5.7LADCMP =IIN1 IN2IW0IW2M0.0Q 5.7FBDIN1IN2M0.

15、0IW0IW2M25.0FG1Hz&C25CUCDRCVBCDQQW6 MW2IN1IN2Q =SRQM25.1Q4.7I1.7I1.7M25.0C25Q4.7MW2FC25Date:* File:SSP1_09C.26SIMATIC S7 Siemens AG 2000. All rights reserved.Information and Training Center Knowledge for Automation主容器Q 5.0 灌装漏斗瓶子传感器 I 8.6 瓶子传感器 I 8.5瓶子传感器 I 8.7练习9.6:瓶装线编程 (灌装循环和瓶子计数)Q 8.5 传送带向前 Q 8.6 传送带向后I 0.0 = 启动 (瞬态常开触点)I 0.1 = 停止 (瞬态常闭触点)

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 其它文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号