Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

AND、OR、NOT

  • Last UpdatedNov 23, 2020
  • 1 minute read

这些运算符仅可用于离散属性。如果在整型或实型数字中使用这些运算法,则会进行如下转换:

  • 实型到离散:如果实型为 0.0,则离散为 0,否则离散为 1。

  • 整型到离散:如果整型为 0,则离散为 0,否则离散为 1。

如果语句为:“Disc1 = Real1 AND Real2;”并且 Real1 是 23.7,Real2 是 0.0,Disc1 会指定为 0,因为 Real1 转换为 1,Real2 转换为 0。

当为整型指定数学运算的浮点结果时,值会四舍五入为最接近的整数,而不会阶段尾数。这就是说,如 IntAttr = 32/60 运算的结果是 IntAttr 的值为 1,而不是 0。如果需要截断尾数,请使用 Trunc() 函数。