加载中…
个人资料
来自金沙江的小鱼
来自金沙江的小鱼
  • 博客等级:
  • 博客积分:0
  • 博客访问:0
  • 关注人气:0
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:大 中 小

ABB_800xA学习笔记226:System_800xA_Control_6.0_AC_800M_Configuration16

(2023-12-09 10:03:49)
标签:

abb

system_800xa_ac800m

配置手册

分类: ABBDCS
继续学习配置手册第一章
Code Pane for Control Module Types and Function Block Types
控制模块类型和功能块类型代码窗格
The code pane in the editor for programs, control module types, function block types, and single control modules supports five programming languages that conforms to the IEC 61131-3 standard. The code pane is always active, and can be accessed irrespective of which tab is selected (parameters, variables, function blocks, etc.).
程序、控制模块类型、功能块类型和单控制模块类型的代码窗格支持IEC61131-3标准的五种编程语言。代码窗格通常是活动的,无论选中哪个选项卡(参数、变量、功能块等)都可以访问。
The code pane can be expanded using more code blocks up to 100 for structuring the code. These code blocks are then executed either in a predetermined order as decided by the compiler (control modules), or from left to right (function blocks).
可以使用更多的代码块来扩展代码窗格,最多使用100个代码块来构建代码。这些代码块将由编译器(控制模块)按照预定的顺序,或者从左到右(功能块)的顺序执行。
Figure 11 shows a part of the code pane of a control module type editor. This code block uses Structured Text (ST) as the language. This editor contains two code blocks: Control and Start_Code.
图11展示了控制模块类型编辑器的代码窗格的一部分。此代码块使用结构化语言(ST)。此编辑器包含两个代码块:Control 和 Start_Code。
ABB_800xA学习笔记226:System_800xA_Control_6.0_AC_800M_Configuration16
Figure 11. A code pane with two code blocks.
图11. 有两个代码块的代码窗格
A brief description of code blocks in general and Start_ code blocks:
通用和Start_ code代码块的简要说明:
  • Code blocks are very useful for structuring the code. Dividing the programming code into a number of code blocks, improves the overall code structure and readability. Examples of code blocks are Control, Object Error, Operators, etc. 代码块对结构化代码很有用处。将程序代码分成许多代码块,改进了整体代码的结构性和可读性。代码块的示例包括 Control、Object Error、Operators 等。

Code block names cannot contain certain characters. See Online help for information on characters that cannot be used in code block names.
代码块名字不能包含某些字符。见联机帮助中不能用于代码块名字的字符。
  • There is no limit to the number of code blocks that can be created in a type. Create only the required number of code blocks, since each code block affects the memory consumption and the execution time of the type. 一个类型中可以创建的代码块的数量没有限制。进创建需要数量的代码块,因为每个代码块都会影响类型的内存消耗和执行时间。
  • Start_     A code block with the prefix Start_ is always executed first in an application and only once, at the application startup (after a warm and cold start, but not after a power failure).  应用程序中以前缀Start_开始的代码块第一个执行,在应用程序开始(在热启动和冷启动之后,但不在电源故障之后)

The Start_ code block is valid only for single control modules and control module types.
Start_ code块仅对单个控制模块和控制模块类有效。
This code block must be used for initiating alarm strings, converting project constants to strings, etc.
此代码块必须用于启动报警字符串、转换项目常量到子覅穿等等。
However, there are some limitations while using the Start_ code block:
然而,还有一些使用 Start_ code 块的限制:
- It is not suitable to place functions, function blocks, etc, in a Start_ code block
不适合将函数、功能块等等放在Start_ code 块中。
- It is valid only for the code blocks in control modules, and not for the code blocks in SFC (Sequential Function Chart).
它仅对控制模块内部的代码块有效,对顺控图SFC中的代码块无效。
- The FirstScanAfterApplicationStart function must not be used in the block.
- FirstScanAfterApplicationStart函数不能在此块中使用。
- Function blocks for communication must not be used in the block.
腾讯功能块不能在此块中使用。
If the application contains a very large chunk of code that has to be run in the first scan (for example, alarms in the Start_ code block), the execution time can be so high that overrun occurs. This leads to the eventual shut-down of the controller.
如果应用程序包含必须在第一次扫描过程中运行的大量代码(例如,Start_代码块中的警报),那么执行时间会很长,以至于溢出,会导致控制器关闭。



0

阅读┊ 收藏 ┊ 喜欢▼ ┊打印┊举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有