上面描述的方案仅仅是一些建议。控制工程师的责任是要确保:
•每次计算的输出返回值适用性/有效性的评定。
•当对特定的属性计算输出是一个不可接受值这一事件发生时,系统指定了适当的追索。
例1:
考虑如下方案:外部输入位号A[A.EXTIN.Value]用于修改POV 41PD1002的脉冲因子值。正如前面所讨论的,我们强烈建议为计算出的值进行有效性评估。
上述截图添加了两个计算。如果脉冲因子属性大于1,计算1将把值截断为1。类似的,如果脉冲因子属性小于0,计算2将把值截断为0。
例2:
从例1的基础上,假设41FC17.MV的最大动作属性被分配为内部输入位号C_Qual的当前值。只有当它严格为正值时,我们才要使用所分配的最大动作属性。因此我们需要添加一个计算以验证最大动作是正值。如果最大动作属性是非正值,我们将对应的最大动作质量设定为BAD。
例3:
这里我们考虑另一种情况。我们要通过外部位号D_Qual包含的值下载MV 41FC17的低限。我们也要确认低限的新值是可接受的(只有当其不大于高限值时)。如果低限的新值超过了当前MV的高限,我们要使用低限老的值。
计算5是一个IF语句,上面写着:“如果MV高限值与位号D_Qual值的差不是负值,就使用D_Qual的值加载MV低限值。同时,如果该差值是负数,就使用当前的MV低限值并且不更新。
3)使用外部输出位号
例4:
鼓励用户使用外部输出位号。外部输出位号可以被用作临时变量拆分大而复杂的计算。举个例子,考虑一个计算当以下任一条件成立时将CV 41PD1004从控制问题中移去:
• POV 41PD1002断开,即41PD1002.POV.disconnect=1。
• POV 41PD1003断开,即41PD1003.POV.disconnect=1。
• 41PD1002.POV.Measurement小于0或大于10。
• 41PD1003.POV.Measurement小于1或大于5。
合并上述所有条件的一个选择是为41PD1004.CV.Remove构建一个嵌套IFF条件。然而,对于某些需要一些条件来评估计算结果的情况(如本例描述的),如果将相关条件组合成一个表达式通常将生成一个复杂的计算。该方法的一个替代方法是使用外部输出位号将复杂计算打破成几个部分,如下图所示:
原文:
The options described above are only suggestions. The onus is on the control engineer to ensure that
• The output of each calculation is assessed for the suitability/validity of the return value,
• Appropriate recourse is specified in the event the output of a calculation is not an acceptable value for a specific attribute.
**Example 1: **
Consider a scenario in which an external input tag A [A.EXTIN.Value] is used to modify the value for the impulse factor for POV 41PD1002. As discussed in the previous section, we strongly recommend that the calculated value be assessed for validity.
In the screenshot above, two calculations have been added. If the impulse factor attribute is greater than 1, calculation 1 truncates the value at 1. Similarly, if the impulse factor attribute is less than 0, the second calculation truncates the value at 0.
**Example 2: **
Building on from Example 1, suppose the Max move attribute for 41FC17.MV is assigned to the current value of an external input tag C_Qual. We want to use the assigned Max move attribute only if it is strictly positive. We add, therefore, a calculation that verifies if the Max move is positive. If the Max move attribute is nonpositive, we set the corresponding Max move quality to BAD.
**Example 3: **
Here we consider another scenario. We want to update the low limit for MV 41FC17 using the value contained in external tag D_Qual. We want to also ensure that the new value for the low limit is accepted only if it is not greater than the high limit. If the new value for the low limit exceeds the current MV high limit, we want to use the old value for the low limit.
Calculation 5 is an IF statement that reads: ‘If the difference between MV high limit and the value of the tag D_Qual is not negative, update the value of the MV low limit using the value of D_Qual. However, if the difference is negative, use the current value of MV low limit and do not update’.
3) Use External Output Tags
Example 4:
The user is encouraged to use external output tags. External output tags may be used as temporary variables to split large and complex calculations. As an example, consider a calculation in which the CV 41PD1004 is removed from the control problem if any of the following conditions hold
• POV 41PD1002 is disconnected i.e. 41PD1002.POV.disconnect=1
• POV 41PD1003 is disconnected i.e. 41PD1003.POV.disconnect=1
• 41PD1002.POV.Measurement is either less than 0 or greater than 10
• 41PD1003.POV.Measurement is either less than 1 or greater than 5
One option to incorporate all the conditions above is to construct a nested IFF condition for 41PD1004.CV.Remove. However, for cases in which a number of conditions are needed to evaluate the outcome of a calculation (such as the one described here), combining relevant conditions into one expression will typically result in a complex calculation. An alternative to this approach is to use external output tags to break the complex calculation into several parts as shown below.
2016.5.2