没有合适的资源?快使用搜索试试~ 我知道了~
首页西门子STEP 7编程手册:自动化设计与操作指南
"西门子Step 7编程手册涵盖了硬件、软件和组态设置,是SIMATIC编程的重要参考资料,适用于6ES7810-4CA10-8BW0产品。"
西门子Step 7是一款强大的编程工具,用于开发和调试基于SIMATIC S7系列PLC(可编程逻辑控制器)的控制系统。该编程手册提供了详细的步骤和指导,帮助用户在不同阶段进行有效的编程和系统配置。
1. 安装:手册首先介绍产品的安装过程,包括软件的下载和安装,确保用户能够正确设置开发环境。
2. 自动化概念:解释自动化系统的整体构想,帮助用户理解如何设计和规划项目。
3. 程序结构设计基础:教导用户如何构建清晰、有序的程序结构,以便于理解和维护。
4. 启动与操作:详述了启动和运行PLC程序的步骤,以及在操作过程中可能遇到的问题和解决方法。
5. 项目设置与编辑:说明如何创建、管理和修改STEP7项目,包括导入和导出功能。
6. 不同版本间的项目编辑:指导用户在不同版本的STEP7之间协作,确保兼容性和一致性。
7. 符号定义:解释如何定义和使用符号,提高代码的可读性。
8. 创建块与库:阐述如何创建、组织和重用程序块,以及创建和管理库文件,提高编程效率。
9. 逻辑块创建基础:介绍基本的编程逻辑,如IF-ELSE结构、CASE语句等。
10. 数据块参数分配:说明如何定义数据块并为其分配参数,实现数据的存储和传递。
11. STL源文件创建:讲解结构文本语言(Structured Text, STL)的使用,这是一种高级的编程语言,适合复杂的控制逻辑。
12. 参考数据查看:提供如何检查和理解块内的变量和函数调用。
13. 块一致性检查与时间戳:教导用户如何验证块的一致性,以及通过时间戳来追踪代码的修改历史。
14. 控制与监控变量:介绍如何监控和控制程序中的变量状态,这对于调试和故障排查至关重要。
15. 在线连接与CPU设置:说明如何建立与PLC的在线连接,设置CPU参数,确保通信正常。
16. 下载与上传:详述将程序下载到PLC以及从PLC上传程序的过程,包括错误处理和备份策略。
17. 变量表测试:利用变量表进行实时测试,观察程序运行时的数据变化。
18. 使用程序状态测试:通过查看程序执行的状态,进行功能测试和性能评估。
19. 模拟测试:通过模拟运行来检测程序逻辑,无需实际硬件即可进行调试。
这个手册不仅对初学者有指导价值,也是经验丰富的工程师的重要参考资料,帮助他们高效地完成SIMATIC S7 PLC的编程任务。通过深入学习和实践,用户可以熟练掌握西门子Step 7编程,从而实现高效、可靠的自动化系统设计。
Contents
Programming with STEP 7
16 Manual, 05/2010, A5E02789666-01
13.7.2 Example of Organization Blocks in STL Source Files ..........................................................299
13.7.3 Example of Functions in STL Source Files...........................................................................301
13.7.4 Example of Function Blocks in STL Source Files.................................................................304
13.7.5 Example of Data Blocks in STL Source Files .......................................................................307
13.7.6 Example of User-Defined Data Types in STL Source Files..................................................308
14 Displaying Reference Data.....................................................................................................................309
14.1 Overview of the Available Reference Data...........................................................................309
14.1.1 Cross-Reference List ............................................................................................................311
14.1.2 Program Structure.................................................................................................................312
14.1.3 Assignment List.....................................................................................................................314
14.1.4 Unused Symbols...................................................................................................................316
14.1.5 Addresses Without Symbols.................................................................................................317
14.1.6 Displaying Block Information for LAD, FBD, and STL ..........................................................317
14.2 Working with Reference Data ...............................................................................................318
14.2.1 Ways of Displaying Reference Data .....................................................................................318
14.2.2 Displaying Lists in Additional Working Windows ..................................................................318
14.2.3 Generating and Displaying Reference Data .........................................................................319
14.2.4 Finding Address Locations in the Program Quickly..............................................................320
14.2.5 Example of Working with Address Locations........................................................................321
15 Checking Block Consistency and Time Stamps as a Block Property ...............................................325
15.1 Checking Block Consistency.................................................................................................325
15.2 Time Stamps as a Block Property and Time Stamp Conflicts..............................................327
15.3 Time Stamps in Logic Blocks................................................................................................328
15.4 Time Stamps in Shared Data Blocks ....................................................................................329
15.5 Time Stamps in Instance Data Blocks ..................................................................................329
15.6 Time Stamps in UDTs and Data Blocks Derived from UDTs ...............................................330
15.7 Correcting the Interfaces in a Function, Function Block, or UDT .........................................330
15.8 Avoiding Errors when Calling Blocks....................................................................................331
16
Configuring Messages............................................................................................................................333
16.1 The Message Concept..........................................................................................................333
16.1.1 What Are the Different Messaging Methods?.......................................................................333
16.1.2 Choosing a Messaging Method ............................................................................................335
16.1.3 SIMATIC Components..........................................................................................................337
16.1.4 Parts of a Message ...............................................................................................................338
16.1.5 Which Message Blocks Are Available? ................................................................................339
16.1.6 Formal Parameters, System Attributes, and Message Blocks .............................................341
16.1.7 Message Type and Messages..............................................................................................342
16.1.8 How to Generate an STL Source File from Message-Type Blocks......................................344
16.1.9 Assigning Message Numbers ...............................................................................................344
16.1.10 Differences Between Project-Oriented and CPU-Oriented Assignment
of Message Numbers............................................................................................................345
16.1.11 Options for Modifying the Message Number Assignment of a Project .................................346
16.2 Project-Oriented Message Configuration..............................................................................347
16.2.1 How to Assign Project-Oriented Message Numbers ............................................................347
16.2.2 Assigning and Editing Block-Related Messages ..................................................................347
16.2.2.1 How to Create Block-Related Messages (Project-Oriented) ................................................348
16.2.2.2 How to Edit Block-Related Messages (Project-Oriented).....................................................350
16.2.2.3 How to Configure PCS 7 Messages (Project-Oriented) .......................................................351
16.2.3 Assigning and Editing Symbol-Related Messages ...............................................................352
16.2.3.1 How to Assign and Edit Symbol-Related Messages (Project-Oriented)...............................352
16.2.4 Creating and Editing User-Defined Diagnostic Messages....................................................353
Contents
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 17
16.3 CPU-Oriented Message Configuration .................................................................................354
16.3.1 How to Assign CPU-Oriented Message Numbers................................................................354
16.3.2 Assigning and Editing Block-Related Messages ..................................................................355
16.3.2.1 How to Create Block-Related Messages (CPU-Oriented)....................................................355
16.3.2.2 How to Edit Block-Related Messages (CPU-Oriented) ........................................................358
16.3.2.3 How to Configure PCS 7 Messages (CPU-Oriented)...........................................................358
16.3.3 Assigning and Editing Symbol-Related Messages...............................................................360
16.3.3.1 How to Assign and Edit Symbol-Related Messages (CPU-Oriented) ..................................360
16.3.4 Creating and Editing User-Defined Diagnostic Messages ...................................................361
16.4 Tips for Editing Messages ....................................................................................................362
16.4.1 Adding Associated Values to Messages ..............................................................................362
16.4.2 Integrating Texts from Text Libraries into Messages............................................................365
16.4.3 Deleting Associated Values ..................................................................................................365
16.5 Translating and Editing Operator Related Texts ..................................................................366
16.5.1 Translating and Editing User Texts.......................................................................................366
16.6 Translating and Editing Text Libraries ..................................................................................368
16.6.1 User Text Libraries................................................................................................................368
16.6.2 Creating User Text Libraries.................................................................................................368
16.6.3 How to Edit User Text Libraries............................................................................................369
16.6.4 System Text Libraries ...........................................................................................................369
16.6.5 Translating Text Libraries .....................................................................................................370
16.7 Transferring Message Configuration Data to the Programmable Controller ........................372
16.7.1 Transferring Configuration Data to the Programmable Controller........................................372
16.8 Displaying CPU Messages and User-Defined Diagnostic Messages ..................................373
16.8.1 Configuring CPU Messages .................................................................................................376
16.8.2 Displaying Stored CPU Messages........................................................................................376
16.9 Configuring the 'Reporting of System Errors' .......................................................................377
16.9.1 Overview of 'Report System Error'........................................................................................377
16.9.2 Configuring the 'Reporting of System Errors' .......................................................................377
16.9.3 Supported Components and Functional Scope....................................................................379
16.9.4 Settings for "Report System Error" .......................................................................................383
16.9.5 Generating Blocks for Reporting System Errors...................................................................385
16.9.6 Generated Error OBs............................................................................................................386
16.9.7 Generated Blocks .................................................................................................................388
16.9.8 Assignment of System Errors to Error Classes ....................................................................390
16.9.9 Generating Foreign-Language Message Texts in 'Report System Error'.............................392
17 Controlling and Monitoring Variables...................................................................................................395
17.1 Configuring Variables for Operator Control and Monitoring .................................................395
17.2 Configuring Operator Control and Monitoring Attributes with Statement List,
Ladder Logic, and Function Block Diagram..........................................................................397
17.3 Configuring Operator Control and Monitoring Attributes via the Symbol Table ...................398
17.4 Changing Operator Control and Monitoring Attributes with CFC .........................................399
17.5 Transferring Configuration Data to the Operator Interface Programmable Controller .........400
Contents
Programming with STEP 7
18 Manual, 05/2010, A5E02789666-01
18 Establishing an Online Connection and Making CPU Settings..........................................................401
18.1 Establishing Online Connections ..........................................................................................401
18.1.1 Establishing an Online Connection via the "Accessible Nodes" Window.............................401
18.1.2 Establishing an Online Connection via the Online Window of the Project ...........................402
18.1.3 Online Access to PLCs in a Multiproject...............................................................................403
18.1.4 Password Protection for Access to Programmable Controllers............................................405
18.1.5 Updating the Window Contents ............................................................................................407
18.2 Displaying and Changing the Operating Mode.....................................................................408
18.3 Displaying and Setting the Time and Date ...........................................................................409
18.3.1
CPU Clocks with Time Zone Setting and Summer/Winter Time ..........................................409
18.4 Updating the Firmware..........................................................................................................411
18.4.1 Updating Firmware in Modules and Submodules Online .....................................................411
19 Downloading and Uploading..................................................................................................................415
19.1 Downloading from the PG/PC to the Programmable Controller ...........................................415
19.1.1 Requirements for Downloading.............................................................................................415
19.1.2 Differences Between Saving and Downloading Blocks ........................................................417
19.1.3 Load Memory and Work Memory in the CPU.......................................................................418
19.1.4 Download Methods Dependent on the Load Memory ..........................................................420
19.1.5 Updating Firmware in Modules and Submodules Online .....................................................421
19.1.6 Downloading a Program to the S7 CPU ...............................................................................424
19.1.6.1 Downloading with Project Management ...............................................................................424
19.1.6.2 Downloading without Project Management ..........................................................................424
19.1.6.3 Reloading Blocks in the Programmable Controller...............................................................424
19.1.6.4 Saving Downloaded Blocks on Integrated EPROM..............................................................425
19.1.6.5 Downloading via EPROM Memory Cards.............................................................................426
19.2 Compiling and Downloading Several Objects from the PG..................................................427
19.2.1 Requirements for and Notes on Downloading......................................................................427
19.2.2 Compiling and Downloading Objects....................................................................................429
19.3 Uploading from the Programmable Controller to the PG/PC................................................431
19.3.1 Uploading a Station...............................................................................................................433
19.3.2 Uploading Blocks from an S7 CPU.......................................................................................434
19.3.3 Editing Uploaded Blocks in the PG/PC.................................................................................434
19.3.3.1 Editing Uploaded Blocks if the User Program is on the PG/PC............................................435
19.3.3.2 Editing Uploaded Blocks if the User Program is Not on the PG/PC.....................................435
19.4 Deleting on the Programmable Controller ............................................................................436
19.4.1 Erasing the Load/Work Memory and Resetting the CPU .....................................................436
19.4.2 Deleting S7 Blocks on the Programmable Controller ...........................................................437
19.5 Compressing the User Memory (RAM).................................................................................438
19.5.1 Gaps in the User Memory (RAM)..........................................................................................438
19.5.2 Compressing the Memory Contents of an S7 CPU ..............................................................439
20 Testing with the Variable Table..............................................................................................................441
20.1 Introduction to Testing with Variable Tables.........................................................................441
20.2 Basic Procedure when Monitoring and Modifying with the Variable Table...........................442
20.3 Editing and Saving Variable Tables......................................................................................443
20.3.1
Creating and Opening a Variable Table ...............................................................................443
20.3.1.1 How to Create and Open a Variable Table...........................................................................444
20.3.2 Copying/Moving Variable Tables ..........................................................................................445
20.3.3 Saving a Variable Table........................................................................................................445
20.4 Entering Variables in Variable Table ....................................................................................446
20.4.1 Inserting Addresses or Symbols in a Variable Table............................................................446
20.4.2 Inserting a Contiguous Address Range in a Variable Table.................................................449
Contents
Programming with STEP 7
Manual, 05/2010, A5E02789666-01 19
20.4.3 Inserting Modify Values ........................................................................................................449
20.4.4 Upper Limits for Entering Timers..........................................................................................450
20.4.5 Upper Limits for Entering Counters ......................................................................................451
20.4.6 Inserting Comment Lines......................................................................................................451
20.4.7 Examples ..............................................................................................................................452
20.4.7.1 Example of Entering Addresses in Variable Tables .............................................................452
20.4.7.2 Example of Entering a Contiguous Address Range .............................................................453
20.4.7.3 Examples of Entering Modify and Force Values...................................................................454
20.5 Establishing a Connection to the CPU..................................................................................456
20.6 Monitoring Variables .............................................................................................................457
20.6.1
Introduction to Monitoring Variables .....................................................................................457
20.6.2 Defining the Trigger for Monitoring Variables.......................................................................457
20.7 Modifying Variables...............................................................................................................459
20.7.1 Introduction to Modifying Variables.......................................................................................459
20.7.2 Defining the Trigger for Modifying Variables ........................................................................460
20.8 Forcing Variables..................................................................................................................462
20.8.1 Safety Measures When Forcing Variables ...........................................................................462
20.8.2 Introduction to Forcing Variables..........................................................................................463
20.8.3 Differences Between Forcing and Modifying Variables........................................................465
21 Testing Using Program Status...............................................................................................................467
21.1 Program Status Display ........................................................................................................468
21.2 What You Should Know About Testing in Single-Step Mode/Breakpoints...........................470
21.3 What You Should Know About the HOLD Mode ..................................................................472
21.4 Program Status of Data Blocks.............................................................................................473
21.4.1
Setting the Display for Program Status.................................................................................474
22 Testing using the Simulation Program (Optional Package) ...............................................................475
22.1 Testing using the Simulation Program S7 PLCSIM (Optional Package)..............................475
23 Diagnostics ..............................................................................................................................................477
23.1 Hardware Diagnostics and Troubleshooting.........................................................................477
23.2 Diagnostics Symbols in the Online View ..............................................................................479
23.3 Diagnosing Hardware: Quick View .......................................................................................481
23.3.1
Calling the Quick View..........................................................................................................481
23.3.2 Information Functions in the Quick View ..............................................................................481
23.4 Diagnosing Hardware: Diagnostic View ...............................................................................482
23.4.1 Calling the Diagnostic View ..................................................................................................482
23.4.2 Information Functions in the Diagnostic View.......................................................................484
23.5 Module Information ...............................................................................................................485
23.5.1 Options for Displaying the Module Information.....................................................................485
23.5.2 Module Information Functions ..............................................................................................486
23.5.3 Scope of the Module Type-Dependent Information..............................................................488
23.5.4 Displaying the Module Status of PA Field Devices and DP Slaves After a Y-Link...............490
23.6 Diagnosing in STOP Mode ...................................................................................................492
23.6.1 Basic Procedure for Determining the Cause of a STOP ......................................................492
23.6.2 Stack Contents in STOP Mode.............................................................................................493
23.7 Checking Scan Cycle Times to Avoid Time Errors...............................................................494
23.7.1 Checking Scan Cycle Times to Avoid Time Errors...............................................................494
23.8 Flow of Diagnostic Information .............................................................................................495
23.8.1 System Status List SSL ........................................................................................................496
23.8.2 Sending Your Own Diagnostic Messages ............................................................................499
23.8.3 Diagnostic Functions.............................................................................................................500
23.9 Program Measures for Handling Errors................................................................................501
Contents
Programming with STEP 7
20 Manual, 05/2010, A5E02789666-01
23.9.1 Evaluating the Output Parameter RET_VAL ........................................................................502
23.9.2 Error OBs as a Reaction to Detected Errors.........................................................................503
23.9.3 Inserting Substitute Values for Error Detection.....................................................................508
23.9.4 I/O Redundancy Error (OB70) ..............................................................................................510
23.9.5 CPU Redundancy Error (OB72)............................................................................................511
23.9.6 Time Error (OB80) ................................................................................................................512
23.9.7 Power Supply Error (OB81) ..................................................................................................513
23.9.8 Diagnostic Interrupt (OB82) ..................................................................................................514
23.9.9 Insert/Remove Module Interrupt (OB83)...............................................................................515
23.9.10 CPU Hardware Fault (OB84) ................................................................................................516
23.9.11 Program Sequence Error (OB85) .........................................................................................516
23.9.12 Rack Failure (OB86) .............................................................................................................517
23.9.13 Communication Error (OB87) ...............................................................................................517
23.9.14 Programming Error (OB121).................................................................................................518
23.9.15 I/O Access Error (OB122).....................................................................................................518
23.10 System Diagnostics with 'Report System Error'....................................................................519
23.10.1 Graphical Output of Diagnostic Events.................................................................................519
23.10.2 Diagnostic Status ..................................................................................................................519
23.10.2.1 Overview of the Diagnostic Status........................................................................................519
23.10.2.2 PROFIBUS Diagnostic Status...............................................................................................519
23.10.2.3 Example of a DB 125 with a DP Slave .................................................................................523
23.10.2.4 Example of a Request for the PROFIBUS DP DB................................................................523
23.10.2.5 PROFINET Diagnostic Status...............................................................................................525
23.10.2.6 Example of a DB126 with an IO System 100 and Devices with Device Numbers 2, 3
and 4 .....................................................................................................................................528
23.10.2.7 Example of a Request for the PROFINET IO DB .................................................................529
23.10.2.8 Diagnostic Status DB............................................................................................................530
23.10.2.9 Example of a Diagnostic Status DB Query...........................................................................533
23.10.2.10 Importing Error and Help Texts.............................................................................................536
24 Printing and Archiving............................................................................................................................539
24.1 Printing Project Documentation ............................................................................................539
24.1.1 Basic Procedure when Printing.............................................................................................540
24.1.2 Print Functions ......................................................................................................................540
24.1.3 Special Note on Printing the Object Tree .............................................................................541
24.2 Archiving Projects and Libraries ...........................................................................................542
24.2.1 Uses for Saving/Archiving.....................................................................................................543
24.2.2 Requirements for Archiving...................................................................................................544
24.2.3 Procedure for Archiving/Retrieving .......................................................................................544
25 Working with M7 Programmable Control Systems..............................................................................545
25.1 Procedure for M7 Systems ...................................................................................................545
25.2 Optional Software for M7 Programming ...............................................................................547
25.3 M7-300/M7-400 Operating Systems.....................................................................................549
剩余701页未读,继续阅读
2021-09-29 上传
2022-06-05 上传
2017-03-02 上传
2019-09-12 上传
2011-06-20 上传
2009-03-16 上传
2012-09-26 上传
2010-07-23 上传
2018-06-19 上传
u010458168
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- SSM Java项目:StudentInfo 数据管理与可视化分析
- pyedgar:Python库简化EDGAR数据交互与文档下载
- Node.js环境下wfdb文件解码与实时数据处理
- phpcms v2.2企业级网站管理系统发布
- 美团饿了么优惠券推广工具-uniapp源码
- 基于红外传感器的会议室实时占用率测量系统
- DenseNet-201预训练模型:图像分类的深度学习工具箱
- Java实现和弦移调工具:Transposer-java
- phpMyFAQ 2.5.1 Beta多国语言版:技术项目源码共享平台
- Python自动化源码实现便捷自动下单功能
- Android天气预报应用:查看多城市详细天气信息
- PHPTML类:简化HTML页面创建的PHP开源工具
- Biovec在蛋白质分析中的应用:预测、结构和可视化
- EfficientNet-b0深度学习工具箱模型在MATLAB中的应用
- 2024年河北省技能大赛数字化设计开发样题解析
- 笔记本USB加湿器:便携式设计解决方案
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功