Stream.Tag

Stream.Tag.GetTagParam

string GetTagParam(string Name, string Param)


Returns the value of the Tag parameter.


Parameters

Parameter

Description

Name

Full Tag name

Param

Parameter name (e.g. Description)


Returns

string


Example

var result = Stream.Tag.GetTagParam("Name", "Param");




Stream.Tag.GetTVS

TagValueStatus GetTVS(string TagName)


Get Tag Value & Status

Retrieves complete tag information including value, status, communication status, and timestamp.

Returns a TagValueStatus object with all tag properties for comprehensive monitoring.


Parameters

Parameter

Description

TagName

Full tag name (e.g., 'Line1.Motor1.Speed')


Returns

TagValueStatus — TagValueStatus object with properties:

Property

Description

TagName

The tag name

RawValue

Current raw value

ScaledValue

Scaled/engineering value

Status

Tag status (Normal, Alarm, etc.)

ComStatus

Communication status

TimeStamp

Last update timestamp


Example

var result = Stream.Tag.GetTVS("TagName");




Stream.Tag.GetValueNum

double GetValueNum(string Name)


Returns the value of a Tag in a numeric format.


Parameters

Parameter

Description

Name

Full Tag name


Returns

double


Example

var result = Stream.Tag.GetValueNum("Name");




Stream.Tag.GetValueStr

string GetValueStr(string Name)


Returns the value of a Tag in a string format.


Parameters

Parameter

Description

Name

Full Tag name


Returns

string


Example

var result = Stream.Tag.GetValueStr("Name");




Stream.Tag.SetTVS

string SetTVS(object tvs)


Set Tag Value & Status

Sets a tag's value, status, and timestamp using a TagValueStatus object or anonymous object.

More flexible than SetValueNum/SetValueStr - allows setting status and custom timestamps.


Parameters

Parameter

Description

tvs

TagValueStatus object or anonymous object

TagName

Full tag name (required)

RawValue

Tag value to set (required)

Status

Tag status (optional, defaults to current)

TimeStamp

Custom timestamp (optional, format: yyyy-MM-dd HH:mm:ss)


Returns

string — 'OK' on success or error message


Example

var result = Stream.Tag.SetTVS(null);




Stream.Tag.SetValueNum

string SetValueNum(string Name, double Value)


Write numeric value to a Tag.


Parameters

Parameter

Description

Name

Full Tag name

Value

Numeric data to be written to the Tag


Returns

string — OK or exception messsage


Example

var result = Stream.Tag.SetValueNum("Name", 0);




Stream.Tag.SetValueNumWithTimeStamp

string SetValueNumWithTimeStamp(string Name, double Value, string TimeStampString)


Write numeric value to a Tag with TimeStamp.


Parameters

Parameter

Description

Name

Full Tag name

Value

Numeric data to be written to the Tag


Returns

string — OK or exception messsage


Example

var result = Stream.Tag.SetValueNumWithTimeStamp("Name", 0, "TimeStampString");




Stream.Tag.SetValueStr

string SetValueStr(string Name, string Value)


Write string data to a Tag.


Parameters

Parameter

Description

Name

Full Tag name

Value

String data to be written to the Tag


Returns

string — OK or exception messsage


Example

var result = Stream.Tag.SetValueStr("Name", "Value");




Stream.Tag.Val

object Val(string Name)


Returns the value of a Tag. If numeric, returns a Double; otherwise returns a String.


Parameters

Parameter

Description

Name

Full Tag name


Returns

object


Example

var result = Stream.Tag.Val("Name");