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

ABB_800xA学习笔记234:System_800xA_Control_6.0_AC_800M_Configuration24

(2023-12-10 19:04:15)
标签:

abb

system_800xa_ac800m

配置手册

分类: ABBDCS
继续学习配置手册第一章功能和组件,进入70页
Connect an instance of Control Module in Connections Editor
在连接编辑器连接控制模块的实例
The Connections editor is a parameter/variable interface between the instance and its closest surrounding. The Connections editor displays the parameters that are declared in the type, with reference to the control module instance, and connects the surrounding parameters/variables to the instance.
连接编辑器是实例和其周边的参数/变量接口。连接编辑器显示了在类型中声明的参数,关联到控制模块接口,连接周围参数/变量到实例。
If a control module instance is created in an application (see Figure 22), then the application can be seen as the closest surrounding, and the variables in the application must be connected to the instance.
如果控制模块实例在应用程序中创建(见图22),应用程序可以看作最近的周边,而应用程序中的变量必须连接到实例。
If a control module instance is created in a type (located in a library), then the type can be seen as the closest entity, and parameters/variables in the type must be connected to the instance.
如果在类型(位于库中)中创建控制模块实例,则该类型可以看作是最接近的实体,类型中的参数/变量必须已连接到实例。
To connect the parameters to instances located several hierarchical layers away (not the closest), use structured data types that simplifies the connections (instead of passing corresponding parameters). For more information on structured data types, refer to the System 800xA Control AC 800M Planning (3BSE043732*)
要将参数连接到位于多个分层层(不是最近的层)的实例,请使用简化连接的结构化数据类型(而不是传递相应的参数)。有关结构化数据类型的更多信息,请参阅系统 800xA 控制 AC 800M 规划 (3BSE043732*)
ABB_800xA学习笔记234:System_800xA_Control_6.0_AC_800M_Configuration24
Figure 22. A control module instance connected to variables in an application. The application is the ‘surrounding area’ with the variables appfb1, Name (initial value ‘PumpMotor’) and appout1 connected to the instance.
图 22. 在应用程序中的控制模块实例连接到变量。应用程序就是有变量appfb1的周边区域,名字(初始变量‘PumpMotor’)和appout1连接到实例。
In Figure 22, the connection parameters for the motor instance connect the parameters (FB1, Name and OUT1) to the variables (appfb1, appout1, Name; Name has the initial value PumpMotor) that have been declared in the application.
图 22. 电机实例的参数连接参数(FB1,Name和OUT1)到已经在应用程序中声明的变量 (appfb1, appout1, Name; 有初始值PumpMotor的Name)。

Function Block Execution
功能块执行
There are three types of function block parameters: In, Out, and In_out.
有三种功能块参数类型:输入、输出、输入输出
The input and output parameters are passed by value, which means that the function block creates copies of each variable value, before and after the function block is executed. The In_Out parameters are passed by reference, which means only a reference to the actual variable outside the function block is passed to and from the function block.
输入和输出参数用数值传输,也就是说功能块在执行功能块前后创建的每个变量值的副本。输入输出参数通过引用传递,这意味着只有对功能块外部实际变量的引用才会传入传出功能块。
Input parameters create a copy of each variable before the function block executes, and the output parameters create a new copy after the function block is executed and pass the new values to the surrounding variables outside the function block.
输入参数在功能块执行之前创建每个变量的副本,输出参数在功能块执行之后创建新的副本,并将新数值传递给功能块外部的周围变量。
For complex data types and strings, a reference to the data instance can be passed in the function block call. This is achieved by setting the attribute of the parameter to by_ref.
对于复杂的数据类型和字符串,可以在功能块调用中传递数据数据实例的引用。这是通过将参数属性设置为by_ref来实现的。
ABB_800xA学习笔记234:System_800xA_Control_6.0_AC_800M_Configuration24
Figure 23. In and Out parameters for a function block. This example illustrates how In and Out parameters copies the variable (var).
图 23. 功能块的 In 和 Out 参数。此示例说明 In 和 Out 参数如何复制变量 (var)
Using by_ref on parameters enhances the performance. It takes a lot of execution time to copy parameters in each scan.
对参数使用 by_ref 可提高性能。在每次扫描中复制参数需要大量的执行时间。
There are some limitations when using by_ref:
使用by_Ref存在一些限制:

  • It is not possible to connect ex*pressions or literals to a reference parameter. 无法将表达式或文本连接到引用参数。
  • If a reference parameter is not connected in one invocation, it cannot be connected in other invocation (if the instance has multiple invocations). 如果引用参数未在一次调用中连接,则无法在其他调用中连接该参数(如果实例有多个调用)。
  • It is not possible to read or write the parameter from outside the function block (except in the invocation). The example ex*pressions like fb.par_in := 2; or k := fb.par_out; are not allowed for reference parameters. 无法从功能块外部读取或写入参数(调用中除外)。示例表达式,如 fb.par_in := 2;或 k := fb.par_out;不允许作为参考参数。

(有点难以理解,表达式的英文怎么就成了非法字符了,只能加*打断一下才过审,今晚先歇了,找非法字符的过程心累,我有点不想继续在这个平台写学习笔记了。)

0

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

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

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

新浪公司 版权所有