译文:
Calculations节点可在Controller树节点中的Build节点后、Report节点前找到,如下图所示:
在主计算窗口中有以下三个选项:
- External Tags—该选项卡用于定义那些预置内核和/或内核后计算所需要的外部输入和输出位号。
- Calculations—这是预置内核和内核后计算所定义的计算编辑器。
- Report –提供一个包含所有预置内核和内核后计算的打印版本。该综合内容也可以复制到Microsoft Excel®/Word®中。
Defining External Tags 定义外部变量
可以在界面上通过单击External Tags选项卡调用外部输入和输出位号。
对每一个外部变量,都有以下三个属性需要被指定:
1、 Name –外部位号的名称;
2、 Description –对所定义位号的描述(可选的);
3、 Type –指明了外部位号的类型,既可以是输入,也可以是输出。这个字段的下拉列表里有两个选择—输入和输出。选择‘input’表示位号是外部输入位号,选择‘output’表示位号是外部输出位号。
注意:‘External tags’术语简单地暗示了这样一个事实,即这些位号可能不是控制器设计的一部分,它们可能不是MVs,CVs,POVs,DVs等等。外部输入位号(控制器范围之外)可能被用于计算的输入。这些位号可以是DCS位号,也可以是数值。外部输出位号可能用于向DCS位号和/或控制器范围外的SMOC数据库中写入结果。外部输出位号也可用于定义复杂计算的中间占位符。
为了说明这个概念,请考虑上图。这个例子包含了两个申明的外部位号。外部位号TEMP1是一个外部输入位号,而外部位号TEMP2是一个外部输出位号。
Calculation Editor 计算编辑器
计算选项带你进入计算编辑器界面。这是所有预置内核和内核后计算所被定义的画面。截图如下所示。
注意上述截图中的计算编辑器被分成两个部分:
•第一部分/框内用于定义所有的预置内核计算。
•第二部分用于定义内核后计算。
输入计算
预置和内核后计算都可以按照下述步骤定义:
1.在相应的(预置内核/内核后)计算表的最后一个可用行中为计算键入名字和描述。
2.单击相应公式栏(预置内核公式或内核后公式)的单元格。编辑框被打开,开始公式定义过程。
3.根据下述三种方法之一定义公式:
a.智能感应;
b.位号浏览器/功能键盘感知对话框;
c.手动输入。
例:
注意:我们强烈建议您使用基于智能感知方法和/或标签浏览器/功能键盘来构建计算。尽管手动输入计算是一个可行的替代,但我们并不建议这么做。在后续内容中我们提供了使用推荐方法搭建计算的细节。
原文:
The Calculations node is found in the Controller tree node right after the Build node and immediately before the Report node as seen below.
The following three tabs are found in the main calculations screen:
- External Tags – This tab is used to define external input and output tags that will be used in pre-kernel and/or post-kernel calculations.
- Calculations – This is the calculation editor in which the pre-kernel and post-kernel calculations are defined.
- Report – Provides a printable version of all the pre-kernel and post-kernel calculations. The consolidated list may also be copied into Microsoft Excel®/Word®.
The screen for defining external input and output tags can be invoked by clicking on the External Tags tab.
For each external tag, three attributes need to be specified namely, - Name – The name of the external tag.
- Description – A description for the defined tag (optional).
- Type – Indicates the type of an external tag, which can be either input or output. This field is a drop down list with two choices—input and output. The choice ‘input’ indicates that the tag is an external input tag and the choice ‘output’ defines the tag to be an external output tag.
NOTE: The term ‘External tags’ simply alludes to the fact that these tags may not be a part of the controller design i.e. they may not be MVs, CVs, POVs, DVs, et cetera. External input tags (outside the scope of the controller) may be used as inputs for a calculation. These tags may be DCS tags but can also be values. External output tags may be used to write the results to a DCS tag and/or to the SMOC database that is not within the scope of the controller. External output tags may also be used as intermediate placeholders for defining complex calculations.
To illustrate this concept, consider the figure above. This example contains two declared external tags. The external tag TEMP1 is an external input tag whereas the external tag TEMP2 is an external output tag.
The calculations tab brings you to the calculation editor. This is the screen in which all the pre-kernel and post-kernel calculations are defined. A screenshot is shown below.
Notice in the screenshot above that the calculation editor is divided into two parts.
• The first part/box is used for defining all pre-kernel calculations
• The second part is used for post-kernel calculation definitions.
Entering Calculations
Both pre- and post-kernel calculations may be defined as follows:
1.Type in a name and a description for the calculation in the last available row of the relevant (pre-kernel/post-kernel) calculation spreadsheet. - Click on the cell corresponding to the formula column (Pre-Kernel Formula or Post-Kernel Formula). An edit box is opened and the formula definition process begins.
- Define the formula according to one of the following 3 methods:
a. Intellisense
b. Tag Browser/Function keypad Selection Dialog
c. Type in Manually
Example:
NOTE: We strongly recommend that you use either the IntelliSense based approach and/or the tag browser/function keypad to build calculations. We discourage manually entering the calculations, though it is an available alternative. Details on using the recommended approaches to construct calculations are provided in the sequel.
2016.4.18