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

Application Server

SetAttributeVT()

  • Last UpdatedJan 19, 2021
  • 1 minute read

Sets the value and timestamp of an object attribute. For buffered values, only the last calculated value is captured for historization.

Category

Miscellaneous

Syntax

SetAttributeVT( Attribute, Value, TimeStamp);

Parameter

Attribute

Name of the object attribute whose value and timestamp are modified. The specified attribute must belong to the object to which the script is attached.

Value

Value of the attribute, which can be a reference. The quality is always set to Good.

TimeStamp

Timestamp that can be a reference, a variable, or a string interpreted as the computer’s local time or UTC. The timestamp is converted internally to UTC format before the attribute’s value is sent to the run-time component.

Remarks

Interim calculated buffered values are NOT historized. Use SetAttributeVT2() if historization of interim values is needed.

Timestamp can be set only for object attributes that support a timestamp. At compile time, the script cannot detect whether the attribute specified with the SetAttributeVT() function supports a timestamp or not. No warning is issued if the attribute does not support a timestamp.

Example

This example sets an integer value and timestamp for an attribute that indicates pump RPM.

SetAttributeVT(me.PV, TC104.PumpRPM, LCLTIME);

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