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

AVEVA™ Plant SCADA

IPen​.GetStatistic [Method]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Returns the result of a specified Process Analyst statistical operation.

Defined As

  • [VBA] GetStatistic(name As String, value As String)

  • [Cicode] GetStatistic(STRING name, STRING value)

  • [C++] HRESULT GetStatistic(BSTR name, BSTR* value)

Parameters

name

[in] Specify the statistic attribute you want to get the value for. See Remarks below for supported attributes.

value

[out] Indicates the value of the specified statistic attribute.

Execution Result

If the function succeeds, the return value will be Success. If an argument is bad, the return value will be InvalidArgument. If the attribute does not exist, the return value will be InvalidArgument. If the pen is deleted, the return value will be GeneralFailure. If any other unexpected error occurs, the return value will be GeneralFailure.

Information Attributes

Attribute

Returns

Applies to

Average

Process Analyst real-time average

Analog, Digital

Maximum

Process Analyst real-time maximum

Analog

Minimum

Process Analyst real-time minimum

Analog

Calling Syntax

Assumes you have passed a valid pen object into the function.

[VBA]

Sub Example(pen As Object)
Dim average As String
pen.GetStatistic "Average", average
End Sub

[Cicode]

FUNCTION Example(OBJECT hPen)
STRING average;
average = _ObjectCallMethod(hPen, "GetStatistic", "Average");
END

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