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

AVEVA™ InTouch HMI

DialogValueEntry() function

  • Last UpdatedJul 15, 2024
  • 2 minute read

Shows the numeric keypad on the screen, enabling the user to change the current value of a discrete, integer or real tag.

Category

misc

Syntax

[Result=] DialogValueEntry(ValueTag_Text, LowLimit, HighLimit, UserPrompt_Text);

Parameters

ValueTag_Text

The name of the discrete, integer, or real tag to modify. This value is a string value. Specify the tagname within quotes or use the .Name field without quotes. You can also use a message tag as a pointer.

LowLimit

The minimum value of the tag. (This should be >= the tagname's definition for minimum value, minimum raw or minimum engineering unit, as applicable).

HighLimit

The maximum value of the tag. (This should be <= the tagname's definition for maximum value, maximum raw or maximum engineering unit, as applicable).

UserPrompt_Text

The user message to show at the top of the keypad.

Return Value

Returns one of the following integer values:

0 = Cancel was pressed.

1 = OK was pressed.

-1 = Highlimit<=Lowlimit.

-2 = Could not initiate.

-3 = Tagname not defined.

-4 = Tagname is not a Discrete, Integer or Real type.

-5 = Write failed.

Remarks

This function is used primarily in applications containing touch screens.

Example(s)

Errmsg=DialogValueEntry(MyIntegerTag.Name, MyIntegerTag.MinEU, MyIntegerTag.MaxEU, "Enter a new value...");

Errmsg=DialogValueEntry("MyIntegerTag", -100, 100, "Enter a new value...");

For example, the following script brings up the numeric keypad, allowing modification of MyIntegerTag using a minimum and maximum limit of -100 and 100 (respectively), while showing the message "Enter a new value..." at the top of the keypad:

TagnameX="MyIntegerTag"; {assign the string MyIntegerTag (which is actually the tagname to be modified) to the Memory Message tagname TagnameX}

Min=-100; {assign the minimum value allowed for the tagname to the Memory Real/Integer tagname Min}

Max=100; {assign the minimum value allowed for the tagname to the Memory Real/Integer tagname Max}

MessageDisplay="Enter a new value..."; {assign the new message string to the Memory Message tagname MessageDisplay}

Errmsg=DialogValueEntry(TagnameX, Min, Max, MessageDisplay); {quotes are not required because TagnameX was defined as a Message tagname. By assigning a Discrete, Integer or Real tagname to TagnameX, the function will modify that assigned tagname}

See Also

DialogStringEntry()

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