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

AVEVA™ InTouch HMI

StringFromIntg() Function

  • Last UpdatedFeb 21, 2017
  • 1 minute read

In a script, you can convert an integer value to a string value by using the StringFromIntg() function.

This function returns the string value of an integer value and performs a base conversion at the same time. This can be used, for example, to show text together with integer values or for converting integer values to hexadecimal numbers.

Syntax

result = StringFromIntg (number, base)

Parameters

number

A literal integer value, integer tagname, or integer expression.

base

The base of the conversion. This is used for converting the value to a different base, such as binary (2), decimal (10) or hexadecimal (16). A literal integer value, integer tagname, or integer expression.

Example(s)

StringFromIntg(26,2) returns "11010" (binary.

StringFromIntg(26,8) returns "32"—because
(base 8: 26 = 3*8 + 2)

StringFromIntg(26,10) returns "26" (decimal).

StringFromIntg(26,16) returns "1A" (hexadecimal).

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in