使用位号浏览器/函数键盘搭建计算
使用智能感知来选择所需的Tag.Types只是其中一种方法。提供简化Tag.Types和内置函数的另一个工具是位号浏览器和函数键盘。
若要调用位号生成器
1.双击预置内核公式或内核后公式区(取决于在何处输入计算);
2.如下图所示,单击位号浏览器图标。
单击位号生成器图标后,如下图所示,位号浏览器在新窗口打开。
位号生成器允许你根据不同的位号组或类型选择合适的Tag.Type列表。例如,MV,CV,POV,DV,控制器,子控制器,EFC,等等。
例如,若要显示MV类型的所有位号,如下图所示,我们选择MV位号组。
你也可以使用位号浏览器的位号名排序功能将位号根据名字排序。例如,要选择所有41TI开头的位号名,我们可以按如下步骤做
若要进一步细化上述列表,以只选择MVs,我们可以在选择MV位号组的同时,加入更多的位号名过滤,如下图所示
若要从位号浏览器中选择一个Tag.Type:
•双击Tag.Type;
•单击并拖动到预置内核/内核后电子表格编辑框。
若要添加属性,请参阅前面所述的基于智能感知过程。
若要调用函数键盘,单击上面的按钮,如下图所示,一个新窗口被打开:
注意:当完成所要求的工作后,若要关闭函数浏览器,请再次点击Function按钮。
推荐练习
1)计算顺序
建立计算时需要考虑的一个重要因素是,在当前的前/后内核计算电子表格中计算执行的顺序。因此,无论是预置内核还是内核后计算,你必须将计算安排成你所需要的执行顺序。
例如,假设你有如下三个形式的计算:
B = A (1)
C = B (2)
D = C + 1 (3)
其中A是外部输入位号,B,C,D都是外部输出位号。
安排的计算如上述所示,将返回一个最终值D,D=A0+1。A0是当计算(1)被执行时A的初始值。
相反,假设计算按照下述顺序:
C = B (2)
B = A (1)
D = C + 1 (3)
注意我们现在已经互换了前两个计算出现的顺序。
按照后者的顺序,最后将返回值D,D=B0+1。其中B0是根据先前周期的第二个式子B=A计算得到的初始值。
注意:无论对于预置内核还是内核后计算,根据你执行需求调整计算顺序是非常重要的。
原文:
Building calculations using the Tag Browser/Function Keypad
Using IntelliSense to select required Tag.Types is one approach. Another tool provided to simplify selection of Tag.Types and built-in functions is the tag browser and function keypad.
To invoke the tag builder
- Double click on either pre-kernel formula or post-kernel formula depending on where the calculation is being entered.
- Click on the tag browser icon as shown below.
On clicking the tag builder icon, the tag browser is opened in a new window as shown below.
The tag builder allows you to sort the available Tag.Type list by the different Tag Groups or types, i.e., MV, CV, POV, DV, controller, sub-controller, EFC, et cetera.
For example, to display all Tags with type MV, we select the Tag group MV as shown below.
You may also use the tag browser’s tag name sorting feature to sort tags by name. For example, to select all tag names that begin with 41TI, we may do the following
To further refine the list above to choose only MVs, we may either select the MV tag group or add further filters for the Tag name as shown below
To select a Tag.Type from the tag browser
• Double click on the Tag.Type
• Click and drag to the edit box in the pre-kernel/post-kernel spreadsheet
To add an attribute, please refer to the IntelliSense-based procedure described earlier.
To invoke the function keypad, click on the button shown above. A new window is opened as shown below
NOTE: To close the Function browser after completion of the required work, just click on the Function button once more.
Recommended Practices
- Order calculations
An important consideration when constructing calculations is the fact that calculations are executed in the order in which they are present in the pre- and post-kernel calculation spreadsheet. Therefore, for both pre-kernel and post-kernel calculations, it is imperative that you arrange calculations in the order in which you want them to be executed.
For example, suppose you have three calculations of the form
B = A (1)
C = B (2)
D = C + 1 (3)
in which A is an external input tag and B, C, and D are external output tags.
Arranging the calculations as shown above, will return a final value for D as D=A0+1 in which A0 is the initial value for A when calculation (1) is evaluated.
In contrast, suppose the calculations were ordered as
C = B (2)
B = A (1)
D = C + 1 (3)
Notice that we have now interchanged the order in which the first two calculations appear.
NOTE: For both the pre- and post-kernel calculations, it is important that you arrange calculations in the order in which you want them to be executed.
For the latter order, the final return value for D is D=B0+1 in which B0 is the initial value of B prior to the assignment B=A in the second calculation.
2016.4.29