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

AVEVA™ InTouch HMI

Text()

  • Last UpdatedSep 24, 2024
  • 1 minute read

根据指定格式将数字转换为文本。

类别

字符串型

语法

StringResult = Text( Number, Format );

参数

编号

任何数字或数值属性。

格式

转换时要使用的格式。实际字符串或字符串属性。

示例

Text(66,"#.00"); ‘ 返回 66.00;

Text(22.269,"#.00"); ‘ 返回 22.27;

Text(9.999,"#.00"); ' 返回 10.00;

以下示例显示如何在其它函数中使用此函数:

LogMessage("The current value of FreezerRoomTemp is:" + Text (FreezerRoomTemp, "#.#"));

在以下示例中,MessageTag 设置为“One=1 Two=2”。

MessageTag = "One + " + Text(1,"#") + StringChar(32) + "Two +" + Text(2,"#");

另请参阅

StringFromIntg()

StringToIntg()

StringFromReal()

StringToReal()

In This Topic
Related Links