联系

Zeus

公式得使用

发布时间:2022-01-21

1.     

2.    如果输入通道公式包含“;”,则该公式将计算输入通道的值和状态。分号之前的第一部分是用于计算值的公式,分号之后的第二部分用于计算状态。

对输出通道使用公式的规则:

1.    处理具有以下内容的输出通道的公式标准和二元命令类型。

2.    输出通道的公式定义了标准命令的命令值计算,并定义了二进制命令的命令数据计算。

公式中可访问的变量:

CnlVal, CnldoubleThe input channel value transmitted to Server before calculation
CnlStatintThe input channel status transmitted to Server before calculation
CmdVal, CmddoubleThe command value transmitted to Server before calculation
CmdDatabyte[]The command data transmitted to Server before calculation
CnlNumintThe channel number for which the formula is calculated
EdoubleThe natural logarithmic base, specified by the constant, e
PIdoubleThe ratio of the circumference of a circle to its diameter, specified by the constant, π


N(n)intReturns the specified channel number for updating numbers on cloning
Val()doubleGets the current value of the formula channel
Val(n)doubleGets the current value of the channel n
SetVal(n, val)doubleSets the current value of the channel n
Stat()intGets the current status of the formula channel
Stat(n)intGets the current status of the channel n
SetStat(n, stat)intSets the current status of the channel n
SetData(n, val, stat)doubleSets the current value and status of the channel n
Abs(x)doubleCalculates the absolute value of a number
Sin(x)doubleCalculates the sine of the specified angle
Cos(x)doubleCalculates the cosine of the specified angle
Tan(x)doubleCalculates the tangent of the specified angle
Exp(x)doubleCalculates e raised to the specified power
Ln(x), Log(x)doubleCalculates the natural (base e) logarithm of a specified number
Sqr(x)doubleCalculates the square of a specified number
Sqrt(x)doubleCalculates the square root of a specified number

公式中可访问的函数: