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

Application Server

LogDataChangeEvent()

  • Last UpdatedSep 20, 2022
  • 1 minute read

Logs an application change event to the application Historian.

The LogDataChangeEvent() function works only in object scripts, not in graphic scripts.

Category

Miscellaneous

Syntax

LogDataChangeEvent(AttributeName, Description, OldValue, NewValue, TimeStamp);

Parameters

AttributeName

Attribute name as a tag name.

Description

Description of the object.

OldValue

Old value of the attribute.

NewValue

New value of the attribute.

TimeStamp

The time stamp associated with the logged event. The timestamp can be UTC or local time. The TimeStamp parameter is optional. The timestamp of the logged event defaults to Now() if a TimeStamp parameter is not included.

Remarks

A graphic script still compiles if the LogDataChangeEvent() function is included. However, a warning message is written to the log at run time that the function is inoperable.

Example

This example logs an event when a pump starts or stops with a timestamp of the current time when the event occurred.

LogDataChangeEvent(TC104.pumpstate, "Pump04", OldState, NewState);

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