ImageVerifierCode 换一换
格式:DOCX , 页数:7 ,大小:61.55KB ,
资源ID:26404856      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/26404856.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ABB DCS 系统 培训课程 系列讲座 Code sorting.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

ABB DCS 系统 培训课程 系列讲座 Code sorting.docx

1、ABB DCS 系统 培训课程 系列讲座 Code sortingChapter 18 Code sorting18.1 General Information 18.1.1 DescriptionThis chapter describes the different methods of code sorting and how to handle loops.18.1.2 ObjectivesOn completion of this chapter you will be able to: Describe the differences between different metho

2、ds of code sorting Describe the advantages of each method Analyze and solve loops in the program code.18.1.3 Reference DocumentationUse the online help: Contents tab, Control Module Diagram Editor Working with Control Modules18.2 Lesson 1 - Code sorting18.2.1 DescriptionThis chapter describes the di

3、fferent methods of code sorting and how to handle loops.18.2.2 ObjectivesOn completion of this lesson you will be able to: Describe the differences between different methods of code sorting Describe the advantages of each method Analyze and solve loops in the program code.18.2.3 According to IEC 611

4、31-3The execution order of function blocks follows the program flow as implemented by the programmer.18.2.4 Control Module Code Sorting- introductionFor Control Modules, the compiler analyzes each code block (ST, IL, FBD, and LD - SFC is treated somewhat differently, see remark below) separately wit

5、h respect to which variables that are read and written, respectively, by each block. The compiler then determines the optimal execution order. A code block that assigns a value to a variable has to be executed before the block that reads the variable value (compare figure below in which the code blo

6、ck in control module 1 must be executed before the code block in control module 2).The technique is called code sorting and means that the optimal execution order will be based on data flow instead of program flow (as is the case for function blocks). Code sorting guarantees that the code will be ex

7、ecuted in correct order. Code sorting suppresses time-delays and results in that a new control module automatically becomes correctly placed in the process.For any from control modules called Function Blocks, it is only the parameter interface (In, Out, or In_out) that affects the code-block sorting

8、. That is, no analysis is made on how the Function Blocks actually use the parameters. In addition, Function Block references to external variables do not affect the execution order of control module code blocks.Code sorting has no effect on control modules connected to different tasks.Within a SFC

9、code block only the N action parts (not P1 or P2 actions) are sorted.18.2.5 Loop handlingHowever, in case both the control modules use the same variable for both reading and writing, the compiler gives a warning message that a loop exists, meaning that the execution order cannot be resolved:This cas

10、e yields the following error information:In the example above, the Request value determines the Deliver value, which, in turn, determines the Request value. This condition is shown in the automatically generated text file, where the figures within parentheses refer to which code block the respective

11、 parameter depends on. Provided that circular dependence actually exists (and is not merely a result of a programming error), the problem can be solved by assigning a State-qualifier to the Delivered variable and introducing a new code block in Control Module 1, Code_Block_12:The loop dependency is

12、now eliminated; Delivered:old stores the value from the previous scan and Delivered:new contains the updated value from the current scan. Hence, the execution order becomes Code_Block_11 - Code_Block_21 - Code_Block_12. The approach is particularly valuable for complex applications, which are diffic

13、ult to monitor manually.18.2.5.1 Remarks on StateState can only be specified for local variables of type bool, int, uint, dint, and real. If you for some reason want to override the sorting and thereby avoid the State implications, you can assign the nosort attribute to the variable.18.2.5.2 Remarks

14、 on NoSortIncorrectly used, the nosort attribute may cause improper execution and application failure. Nosort should typically be used only when the code block connections themselves unambiguously determine the execution order Use nosort only if you know the data flow characteristics in detail.18.2.

15、6 Code Sorting AdvantagesThe advantages of code sorting are best illustrated with a couple of examples: First consider a PID cascade loop (used for updating the PID integrators in case of manual operation), in which data flow in both directions between the master and the slave. This is handled by th

16、e Back code blocks at the end of the scan. This is not possible to do with function blocks if you want to work in an object-oriented way and avoid time delays.Second, now consider an application according to the illustration below. Lets say that some time after the application was set up, the need f

17、or a third conveyer arises. Because of the code sorting, a Control Module representing the functionality of the new conveyer becomes added and connected in the right place in the application logic (provided that the application has been properly designed in the specification phase).18.3 Exercise 18.

18、1 Code sortingPlease do exercise 18.1Du kan tag bort denna osynliga text men ltnedanstende Page Break ligga kvar !Lt ven den efterfljande sidan ligga kvar !This page is intentionally left blankThis page is intentionally left blankOsynlig text:Nsta sida mste brja p UDDA sidnummerLmna EN eller TV tomm

19、a sidor hr OVANFR.Nedanstende Section Break fr INTE tas bort !Komplettera tom sida vid behov med nedanstende textThis page is intentionally left blank TABLE OF CONTENTSChapter 18 Code sorting 118.1 General Information 118.1.1 Description 118.1.2 Objectives 118.1.3 Reference Documentation 118.2 Lesso

20、n 1 - Code sorting 218.2.1 Description 218.2.2 Objectives 218.2.3 According to IEC 61131-3 218.2.4 Control Module Code Sorting- introduction 218.2.5 Loop handling 318.2.5.1 Remarks on State 418.2.5.2 Remarks on NoSort 418.2.6 Code Sorting Advantages 518.3 Exercise 18.1 Code sorting 6Du kan ta bort denna osynliga text men ltnedanstende Page Break ligga kvar !Lt ven den efterfljande sidan ligga kvar !This page is intentionally left blank

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1