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

AVEVA™ InTouch HMI

WWRequest() Function

  • Last UpdatedFeb 21, 2017
  • 2 minute read

Reads data from an item of an application. You can use it, for example, to read the value of a spreadsheet cell in Microsoft Excel.

Important: The WWRequest() function does not work on 64-bit versions of the Windows operating system.

Syntax

Result = WWRequest(appname, topic, item, messagetag)

Parameters

appname

The name of the application. A literal string value, message tagname, or string expression.

topic

The name of the topic within the application. A literal string value, message tagname, or string expression.

item

The name of the item belonging to the topic and application. A literal string value, message tagname, or string expression.

messagetag

A message tagname to retrieve the value of the item. The message tagname value can be converted into an integer or real value by using the StringToIntg() or StringToReal() functions.

Return Value

A value of -1, 0, or 1 indicating the following:

-1 - data not read successfully. Possible causes are the application not running or the topic or item do not exist.

0 - data not read successfully because the application is busy.

1 - data read successfully.

Example(s)

This script reads the value contained in Microsoft Excel book Book1.xls, sheet Sheet1 in Row 1, Column 1 to the message tagname MTag and puts the value in the real tagname CellValue.

Result = WWRequest("excel","[Book1.xls]sheet1", "r1c1",Mtag);

CellValue=StringToReal(MTag);

If you are using a non-English operating system, you may need to use the StringReplace() function to change the contents of MTag before converting it to a different data type. For example, for operating systems that use a comma as a decimal separator, you may need to replace all commas with decimal dots in MTag before converting it to a real data type.

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