【北京西门子培训教程】数字指令.ppt
《【北京西门子培训教程】数字指令.ppt》由会员分享,可在线阅读,更多相关《【北京西门子培训教程】数字指令.ppt(36页珍藏版)》请在文库网上搜索。
1、Date:2023/12/8File:SSP1_09C.1SIMATIC S7Siemens AG 2000.All rights reserved.Information and Training CenterKnowledge for Automation数字指令数字指令CMP=IIN1IN2IW0IW2M0.0Q 5.7T4S_ODTTVSQBCDBIRI0.7I0.5S5T#35sQ4.5MW0QW6Date:2023/12/8File:SSP1_09C.2SIMATIC S7Siemens AG 2000.All rights reserved.Information and Tra
2、ining CenterKnowledge for Automation数据格式数据格式十进制 BCD数 数00000100012001030011401005010160110701118100091001101112131415110011017000000001580128+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:2023/12/8Fi
3、le:SSP1_09C.3SIMATIC S7Siemens AG 2000.All rights reserved.Information and Training CenterKnowledge for Automation数据格式数据格式(16 (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
4、0 1 1413符号(-)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:2023/12/8File:SSP1_09C.4SIMATIC S7Siemens AG 2000.All rights reserved.Information and Training CenterKnowledge for Automat
5、ion数据格式数据格式(32 (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 1 1
6、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:2023/12/8File:SSP1_09C.5SIMATIC
7、S7Siemens AG 2000.All rights reserved.Information and Training CenterKnowledge for Automation装载举例数据装入和传递数据装入和传递 (1)(1)L +5/16-位常数(整数)L L#523123/32-位常数(双整数)L B#16#EF/十六进制字节L 2#0010 0110 1110 0011/16-位二进制值L 3.14/32-位常数(实数)MOVEENIN OUT ENO MB55FBDL+5TMB5STLMOVEEN OUT ENO MB5LADIN5Date:2023/12/8File:SSP
8、1_09C.6SIMATIC S7Siemens AG 2000.All rights reserved.Information and Training CenterKnowledge for Automation数据装入和传递数据装入和传递(2)(2)00000000:L W#16#CAFEL W#16#AFFE:XXXXXXXXCAFEAFFE ACCU2内容内容 ACCU1内容内容程序程序YYYYYYYYXXXXXXXX0000CAFEDate:2023/12/8File:SSP1_09C.7SIMATIC S7Siemens AG 2000.All rights reserved.I
9、nformation and Training CenterKnowledge for Automation数据装入和传递数据装入和传递(3)(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:2023/12/8File:SSP1_09C.8SIMAT
10、IC S7Siemens AG 2000.All rights reserved.Information and Training CenterKnowledge for AutomationLADSTL示例:输入延时S_ODTAI0.7LS5T#35sSD T4AI0.5RT4LT4TMW0LC T4TMW2AT4=Q8.5定时器概述Date:2023/12/8File:SSP1_09C.9SIMATIC S7Siemens AG 2000.All rights reserved.Information and Training CenterKnowledge for Automation定
11、时器:接通延时定时器:接通延时(SD)SD)LADT4S_ODTTVSQBCD BIRI0.7I0.5S5T#35sQ4.5MW0QW6FBDS_ODTTVQ BIRI0.7I0.5S5T#35sMW0QW6T4BCD=Q4.5SSTLAI0.7LS5T#35sSD T4AI0.5RT4LT4TMW0LC T4TQW6AT4=Q4.5例如S处的RLO R处的RLO 定时器操作Q时间值:0.9990,01s-0,1s-1s-10s=1Q4.0Date:2023/12/8File:SSP1_09C.21SIMATIC S7Siemens AG 2000.All rights reserved.In
12、formation and Training CenterKnowledge for AutomationSTEP 7STEP 7中的中的S5S5计数器计数器STLAI0.4CUC5AI0.5CDC5AI0.3LC#20SC5AI0.7RC5LC5TMW4LCC5TQW6AC5=Q4.3LADFBDQI 0.4I 0.5CUI 0.7C#20S_CUDCDSI 0.3PVRQ 4.3 CVCV_BCDMW 4QW 6C5QQI 0.4I 0.5CUI 0.7C#20S_CUDCDSI 0.3PVRQ 4.3 CVCV_BCDMW 4QW 6C5=QDate:2023/12/8File:SSP1
13、_09C.22SIMATIC S7Siemens AG 2000.All rights reserved.Information and Training CenterKnowledge for Automation计数器:位指令计数器:位指令STLAI0.0 LC#20SC5AI0.1CU C5AI0.2 CD 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:2023/12
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 北京西门子培训教程 北京 西门子 培训 教程 数字 指令