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

AVEVA™ Plant SCADA

AlmSummarySetFieldValue

  • Last UpdatedApr 15, 2024
  • 1 minute read

The AlmSummarySetFieldValue function sets a new value for the specified field for the record the data browse cursor is currently referencing. The value is not committed until a call to AlmSummaryCommit is made.

The new values are discarded if the cursor is moved away from the current alarm summary entry before AlmSummaryCommit is made in the data browse session

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Note: This function will only work while the record is writable which is controlled by the [Alarm]ArchiveAfter parameter. Refer to the topic Configure the Archiving Parameters for more information.

Syntax

LONG AlmSummarySetFieldValue(iSession, sFieldname, sFieldValue)

iSession:

The handle to a browse session previously returned by a AlmSummaryOpen call.

sFieldName:

The name of the field whose value is to be updated. Supported fields are:

AckTime

Alarm acknowledged time

Comment

Alarm Comment

OffMilli (for time stamped alarms only)

Alarm millisecond off time

OffTime

Alarm OFF time

See Browse Function Field Reference for additional information about fields.

sFieldValue:

The field value to update.

Return Value

0 (zero) if the alarm browse session exists, otherwise an error code is returned.

AlmSummaryAck, AlmSummaryClear, AlmSummaryClose, AlmSummaryCommit, AlmSummaryDelete, AlmSummaryDeleteAll, AlmSummaryDisable, AlmSummaryEnable, AlmSummaryFirst, AlmSummaryGetField, AlmSummaryLast, AlmSummaryNext, AlmSummaryOpen, AlmSummaryNumRecords

Example

STRING sFieldValue = "NEW_COMMENT";

STRING sFieldName = "COMMENT";

INT errorCode = 0;

...

errorCode = AlmSummarySetFieldValue(iSession, sFieldname,

sFieldValue);

IF errorCode = 0 THEN

// Successful case

ELSE

// Function returned an error

END

...

See Also

Alarm Functions

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