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

ABB_800xA学习笔记243:System_800xA_Control_6.0_AC_800M_Configuration33

(2023-12-11 18:01:54)
标签:

abb

system_800xa_ac800m

配置手册

功能和组件

分类: ABBDCS
继续学习配置手册第一章功能和组件,进入第85页。
Variable Entry
变量条目
Control Builder helps the user to declare variables in applications, programs, function block types and control module types. This section covers the entries: Name, Data Type, Attributes, Initial Value and Description.
Control Builder 帮助用户在应用程序、程序、功能块类型和控制模块类型声明变量。本部分涵盖条目:名称、数据类型、属性、初始值和描述。
Name
名字
It is recommended that variables are given simple and explanatory names, and that they begin with a capital letter. Names consisting of more than one word should have capital letters at the beginning of each new word. Examples of recommended variable names are DoorsOpen, PhotoCell.
建议为变量提供简单且解释性的名称,并且它们以大写字母开头。由一个以上单词组成的名称应在每个新单词的开头使用大写字母。推荐的变量名称示例包括 DoorsOpen、PhotoCell
Certain names, however, are reserved by the system and cannot be used for other purposes, for example true. An error message appears if such a word is used. For naming guidelines and information on relevant tools, refer to the System 800xA Control AC 800M Planning (3BSE043732*).
但是,某些名字由系统保留,不能用于其它目的,比如true。如果使用这种名字,会出现错误信息。有关命名指南和相关工具的信息,请参阅《 System 800xA Control AC 800M Planning (3BSE043732*)》。
Data Types
数据类型
A data type defines the characteristics of a variable type. There are both simple and structured data types in Control Builder. A variable of simple data type contains a single value, while a structured data type contains a number of components of simple or structured data types.
数据类型定义了变量类型的特征。Control Builder中有简单数据类型,也有结构化数据类型。简单数据类型包含单个数值,而结构化数据类型包含许多简单数据类型的组件。
Table 6 presents the most common simple data types and the initial value when the variable is declared.
表 6. 显示了最常见的简单数据类型和变量定义是的初始值
Table 6. Simple data types
表 6. 简单数据类型(表格中字和双字长度一样,是不是印刷错了?
 Data type
 数据类型
 Description
 描述
 Bytes allocated
 by variable
变量占用字节数
Initial value
 (default) 
初始值
(默认)
 bool  Boolean  4  False, 0
 dint  Double integer  4  0
 int  Integer  4  0
 uint  Unsigned integer  4  0
 string(1)  Character string(2)  10 bytes + stringlength [n]  ''
 word  Bit string  4  0
 dword  Bit string  4  0
 time  Duration  8  T#0s
 date_and_time(1)  Date and time of day  8  1979-12-31-
 00:00:00
 real(3)  Real number  4  0.0

(1) It is allowed to use variables of string and date_and_time also in SIL3 applications; however, the
result must never influence the safety function of a SIL certified application. The variables cannot be send via safe peer to peer MMS, as SIL data.
在SIL3中允许使用字符串变量和日期时间变量,但是结果决不能影响SIL认证应用的安全性。变量不能作为 SIL 数据通过安全的点对点 MMS 发送。
(2)String length is 40 characters by default, but can be changed by entering string[n] as the data
type, where n is the string length. The number of bytes allocated for string[40] will be (40 +10)
50. The maximum string length is 140.
字符串长度默认40个字符,但可以通过输入string[n]作为数据修改类型,n是字符串长度。分配给string[40]的字节数将为50。最大字符串长度为140.
(3) Implemented according to IEEE 754, single precision floating point. See Real value in AC 800M on page 129.
依据IEEE 754实现,单精度浮点数。见第129页《Real value in AC 800M

Comparison of variables of unsigned data types (uint, word, and dword) will not work properly if the most significant bit is set. Internally, they are handled as signed, where the most significant bit is used as the sign. This means that a word variable with a value above 32767 will be considered to be smaller than a word variable with a value below 32768.
如果设置了最高有效位,则无符号数据类型(uint、word 和 dword)的变量的比较将无法正常工作。在内部,它们被处理为有符号,其中最高有效位用作符号。这意味着值高于 32767 的WORD变量将被视为小于值低于 32768 的WPRD变量。
When declaring variables or parameters of the data type string, always define the required length within square brackets (for example, string[20]), to minimize allocated memory. If the string length is not defined, then Control Builder automatically allocates memory for a 40 character string length.
当声明字符串数据类型变量或者参数,总是在方括号内定义需要的长度(例如string[20]),以最大限度减少内存的分配。如果不定义字符串长度,Control Builder 自动为40个字符的长度分配内存。
Use variables of data type string with care. Strings occupy a great deal of memory, and require much execution time to be copied or concatenated.
小心使用数据类型为string的变量。变量占用大量内存,需要大量的执行时间才能复制或者连接。
A structured data type contains a number of components of simple or structured data type. For bidirectional communication using structured data types, a reverse attribute must be set to indicate which components communicate in the opposite direction (see also Bidirectional Communication Variable on page 107).
结构数据类型包含许多简单或者结构数据类型的组件。对于使用结构化数据类型的双向通信,必须设置反向属性以指示哪些组件以相反方向进行通信(另请参阅第 107 页的双向通信变量)
There are a number of predefined data types in Control Builder (for example BoolIO and RealIO) that are structured data types. User-defined structured data types can also be created, see Decisions When Creating Types on page 64.
Control Builder中有许多预定义数据类型(比如 BoolIO和RealIO)是结构化数据类型,还可以创建用户定义的结构化数据类型。见第64页《Decisions When Creating Types》。
The word “default” can be used as an initial value for a parameter in a control module type or diagram type. This works for both simple and structured data types. For a structured data type, the initial value “default” gives the default value of the data types for all components.
“默认”可用于控制模块或者图表类型的参数初始数值。这适用于简单数据类型和结构化数据类型。对于结构化数据类型,默认值给出了所有组件数据类型的初始值。
This is useful when creating types; for input parameters of a structured data type that do not have to be connected, and for output data types that do not have to be connected.
(默认值)在创建类型时很有用,对不需要连接的结构数据类型的输入参数,和不需要连接的输出数据类型。
More information is given in Control Builder online help. Search the index for “structured data type”.
Control Builder 联机帮助中提供了更多信息。在索引中搜索“结构化数据类型”。

0

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

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

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

新浪公司 版权所有