Tag properties library

<< Click to Display Table of Contents >>

Navigation:  Project > Scripts > ST language > Embedded functions >

Tag properties library

Previous pageReturn to chapter overviewNext page

gettagvalue(Input1, Input2) - used to get value of the tag. Input1 contains name of the tag; Input2 contains default value, if the tag is not exist.

 

Example:

string value = gettagvalue(“value”, “1”);

 


gettagvalueorerror(Input1, Input2) - used to get value of the tag. Input1 contains name of the tag; Input2 contains name of the error tag. If tag with name in Input1 doesn't exist TRUE is placed in the tag with name in Input2.

 

Example:

string value = gettagvalueorerror(“value”, “errortag”);

 


settagvalue(Input1, Input2) - used to set value of the tag. Input1 contains name of the tag; Input2 contains value.

 

Example:

settagvalue(“value”, “1”);

 


gettagdescription(Input1, Input2) - used to get description of the tag. Input1 contains name of the tag; Input2 contains default description, if the tag is not exist.

 

Example:

string description = gettagdescription(“value”, “description”);

 


settagdescription(Input1, Input2) - used to set description of the tag. Input1 contains name of the tag; Input2 contains description.

 

Example:

settagdescription(“value”, “1”);

 


gettagenablealarms(Input1) - used to get tag information about enable or not alarms. Input1 contains name of the tag.

 

Example:

bool enablealarm = gettagenablealarms(“tagname”);

 


settagenablealarms(Input1, Input2) - used to enable or disable alarms for the tag. Input1 contains name of the tag; Input2 contains value (true for enable or false for disable).

 

Example:

settagenablealarms(“tagname”, “true”);

 


settagalarm(Input1, Input2, Input3) - used to enable or disable alarm for the tag. Input1 contains name of the tag; Input2 contains alarm’s type(“hihi”, “hi”, “lolo”, “lo”, “normal”); Input3 contains value (true for enable or false for disable).

 

Example:

settagalarm(“tagname”, ”hihi”, “true”);

 


settagalarmlimit(Input1, Input2, Input3) - used to set alarm limit of the tag. Input1 contains name of the tag; Input2 contains alarm’s type(“hihi”, “hi”, “lolo”, “lo”); Input3 contains limit’s value.

 

Example:

settagalarmlimit(“tagname”, ”hihi”, 500);

 


settagalarmpriority(Input1, Input2, Input3) - used to set alarm priority of the tag. Input1 contains name of the tag; Input2 contains alarm’s type(“hihi”, “hi”, “lolo”, “lo”,”normal”); Input3 contains priority’s value.

 

Example:

settagalarmpriority(“tagname”,”hihi”, 500);

 


settagalarmmessage(Input1, Input2, Input3) - used to set tag’s alarm message. Input1 contains name of the tag; Input2 contains alarm’s type(“hihi”, “hi”, “lolo”, “lo”,”normal”); Input3 contains message value.

 

Example:

settagalarmmessage(“tagname”, ”hihi”, “Value is to high”);

 


settagalarmdeadband(Input1, Input2) - used to set tag’s alarm deadband. Input1 contains name of the tag; Input2 contains deadband’s value.

 

Example:

settagalarmdeadband(“tagname”, 0.5);

 


settagenablehistory(Input1, Input2) - used to enable or disable tag’s history. Input1 contains name of the tag; Input2 contains value (true for enable or false for disable).

 

Example:

settagenablehistory(“tagname”, “true”);

 


settagstorageperiod(Input1, Input2) - used to set tag’s storage period. Input1 contains name of the tag; Input2 contains storage period’s value.

 

Example:

settagstorageperiod(“tagname”, 1000);

 


settagstoreindb(Input1, Input2) - used to enable or disable tag’s storage value in DB. Input1 contains name of the tag; Input2 contains value (true for enable or false for disable).

 

Example:

settagstoreindb(“tagname”, “true”);

 


settaghistorydeadband(Input1, Input2) - used to set tag’s history deadband. Input1 contains name of the tag; Input2 contains history deadband's value.

 

Example:

settaghistorydeadband(“tagname”, 1.0);