Calculations

You can define Calculation Tags to perform automatic processing of math formulas with any number of local or remote Tags as a data source. You can even use values directly from OPC Servers with the DirectOPC interface, and these OPC Items can also come from the local service or a remote service.View the following video presentation on Calculations:

If you enable Security on a remote Service to disable all or selected Tags you will need to define the OAS Service User Name and Password under Configure Options, but also recommend to then enable Security to limit access of Read Tags under Configure-Security.

The following is a quick guide as an example to create a Calculation Tag:

Step 1

Using Configure-Tags create a new Tag with the name Total.

Select the local Service or the remote Service with the Ramp, Sine, and Random Tags.

Step 2

Select the new Total Tag and set the Data Source as Calculation.

Calculation

Step 3

Use the Edit Calculation button at the right to show the Calculation editor.

Edit Calculation

Select the Insert Tag button and select Ramp.Value.

Calculation Editor

Add a + symbol after [Ramp.Value] and insert the Tag Sine.Value.

Add a + symbol after [Sine.Value] and insert the Tag Random.Value.

The equation should now represent a total of all 3 Tags as the following:

[Ramp.Value]+[Sine.Value]+[Random.Value]

You can select OK and Apply Changes to then see the Total Tag value update to the total of all 3 Tags.

Refer to the Configure-Tags-Calculations section in the Open Automation Software Help file for descriptions of each Function for the Calculation engine.

Note: If any tag data source in a calculation is bad the resultant data quality for the calculation tag will also be bad unless you use the property Source When Bad.

Function Reference

Following is a list of functions and their expected parameters.

ABS

Summary:

Returns absolute value.

Parameters:

Value to convert to absolute value

Internal code:

return Math.Abs(p[0].GetValueAsDouble());

 

ASCTOINT

Summary:

Converts ascii character to integer value.

Parameters:

Ascii character value to convert

Internal code:

Int32 testInteger;

string stringValue = p[0].GetValueAsString();

if (stringValue == null)

return 0;

if (stringValue.Length < 1)

return 0;

Char[] testChars;

testChars = stringValue.ToCharArray();

byte[] testBytes;

testBytes = Encoding.ASCII.GetBytes(testChars);

testInteger = testBytes[0];

return testInteger;

 

ASIN

Summary:

Returns the angle whose sine is the specified number.

Parameters:

A number representing a sine, where d must be greater than or equal to -1, but less than or equal to 1.

Internal code:

return Math.Asin(p[0].GetValueAsDouble());

ATAN

Summary:

Returns the angle whose tangent is the specified number.

Parameters:

A number representing a tangent.

Internal code:

return Math.Atan(p[0].GetValueAsDouble());

AVG

Summary:

Returns the moving average over a specified time period.

Parameters:

Tag value to evaluate in the moving average.

Time period to evaluate in seconds.

Internal code:

            Complex code using arrays of values and timestamps.

BCDINT

Summary:

Converts binary coded decimal to integer value.

Parameters:

BCD value to convert

Internal code:

double doublebcdvalue = p[0].GetValueAsDouble();

ulong bcdvalue = System.Convert.ToUInt64(doublebcdvalue);

string convertedString = bcdvalue.ToString(“X4”);

return System.Int32.Parse(convertedString);

BITC

Summary:

Bit compare of a specific bit postion of an integer value.

Parameters:

Integer value to evaluate

Bit position

Internal code:

double x = p[0].GetValueAsDouble();

double y = p[1].GetValueAsDouble();

ulong intVal = Convert.ToUInt64(Math.Floor(x));

int bitIndex = Convert.ToInt32(Math.Floor(y));

ulong shiftValue = 1;

ulong valueToCompare = shiftValue << bitIndex;

return (intVal & valueToCompare) > 0 ? 1 : 0;

BITSHIFTLEFT

Summary:

Bit shift left a specified number of bits of an integer value.

Parameters:

Integer value to evaluate

Number of bits to shift left

Internal code:

double x = p[0].GetValueAsDouble();

double y = p[1].GetValueAsDouble();

ulong intVal = Convert.ToUInt64(Math.Floor(x));

int bitIndex = Convert.ToInt32(Math.Floor(y));

return (intVal << bitIndex);

BITSHIFTRIGHT

Summary:

Bit shift right a specified number of bits of an integer value.

Parameters:

Integer value to evaluate

Number of bits to shift right

Internal code:

double x = p[0].GetValueAsDouble();

double y = p[1].GetValueAsDouble();

ulong intVal = Convert.ToUInt64(Math.Floor(x));

int bitIndex = Convert.ToInt32(Math.Floor(y));

return (intVal >> bitIndex);

BITWISEAND

Summary:

Bitwise AND of 2 integers.

Parameters:

Integer value to evaluate

Integer value to evaluate

Internal code:

double x = p[0].GetValueAsDouble();

double y = p[1].GetValueAsDouble();

ulong intVal = Convert.ToUInt64(Math.Floor(x));

ulong bitIndex = Convert.ToUInt64(Math.Floor(y));

return (intVal & bitIndex);

CEIL

Summary:

Ceiling of value.  Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number.

Parameters:

Value to evaluate

Internal code:

return Math.Ceiling(p[0].GetValueAsDouble());

CHR

Summary:

Returns a specific character within a string.

Parameters:

String value

Position of character within the string to return.

Internal code:

IConvertible o = p[0].GetValue();

IConvertible i = p[1].GetValue();

int index = Convert.ToInt32(i);

if(o is String)

{

return ((String)o)[index].ToString();

}

return Convert.ToString(o)[index].ToString();

CONCAT

Summary:

Concatenate strings together.

Parameters:

Strings to concatenate.

Internal code:

StringBuilder sb = new StringBuilder();

for(int i=0; i<p.Length; i++)

{

sb.Append(p[i].GetValueAsString());

}

return sb.ToString();

CONTAINS

Summary:

Returns true if string contains the second string parameter.

Parameters:

String to evaluate.

String to check for.

Internal code:

String temp = p[0].GetValueAsString();

String temp2 = p[1].GetValueAsString();

if (temp.Contains(temp2) )

return 1;

else

return 0;

COS

Summary:

Returns the cosine of the specified angle.

Parameters:

Value to convert.

Internal code:

return Math.Cos(p[0].GetValueAsDouble());

COSH

Summary:

Returns the hyperbolic cosine of the specified angle.

Parameters:

Value to convert.

Internal code:

double x__ = p[0].GetValueAsDouble();

return (Math.Exp(x__)+Math.Exp(-x__))*0.5;

COTAN

Summary:

Returns the cotangent of the specified angle.

Parameters:

An angle, measured in radians.

Internal code:

return 1/Math.Tan(p[0].GetValueAsDouble());

ENDSWITH

Summary:

Returns true if string ends with the second string parameter.

Parameters:

String to evaluate.

String to check for.

Internal code:

String temp = p[0].GetValueAsString();

String temp2 = p[1].GetValueAsString();

if (temp.EndsWith(temp2))

return 1;

else

return 0;

EXP

Summary:

Returns e raised to the specified power.

Parameters:

Value to convert.

Internal code:

return Math.Exp(p[0].GetValueAsDouble());

FLOOR

Summary:

Floor of value.  Returns the largest integer less than or equal to the specified double-precision floating-point number.

Parameters:

Value to convert

Internal code:

return Math.Floor(p[0].GetValueAsDouble());

HIGHBYTE

Summary:

Returns the high byte of a word.

Parameters:

Value to convert

Internal code:

double rawAsDouble = p[0].GetValueAsDouble();

UInt16 intVal = Convert.ToUInt16(rawAsDouble);

byte[] bytes = BitConverter.GetBytes(intVal);

if (BitConverter.IsLittleEndian)

return bytes[1];

else

return bytes[0];

HIGHWORD

Summary:

Returns the high word of an integer.

Parameters:

Value to convert

Internal code:

double rawAsDouble = p[0].GetValueAsDouble();

UInt32 intVal = Convert.ToUInt32(rawAsDouble);

byte[] bytes = BitConverter.GetBytes(intVal);

UInt16 tempWord;

if(BitConverter.IsLittleEndian)

tempWord = BitConverter.ToUInt16(bytes, 2);

else

tempWord = BitConverter.ToUInt16(bytes, 0);

return tempWord;

IF

Summary:

If, Then, Else.  Returns second parameter if first parameter is true, returns third parameter if first parameter is false.

Parameters:

Condition to evaluate

Value to return if condition is true

Value to return if condition is false

Internal code:

return (p[0].GetValueAsDouble()!=0.0) ? p[1].GetValue() : p[2].GetValue();

INDEXOF

Summary:

Returns position of first occurance of string to check for within the string to evaluate.

Parameters:

String to find index in

String to check for

Internal code:

String temp = p[0].GetValueAsString();

String temp2 = p[1].GetValueAsString();

Int32 firstIndex;

firstIndex = temp.IndexOf(temp2);

return firstIndex;

INTBCD

Summary:

Converts integer to binary coded decimal.

Parameters:

Integer value to convert

Internal code:

double doublebcdvalue = p[0].GetValueAsDouble();

ulong intvalue = System.Convert.ToUInt64(doublebcdvalue);

string convertedString = intvalue.ToString(“0”);

ulong returnvalue = System.Convert.ToUInt64(convertedString, 16);

return returnvalue;

INTPOW

Summary:

Returns a specified number raised to the specified power.

Parameters:

Value to be raised to a power.

The power.

Internal code:

double x = p[0].GetValueAsDouble();

double y = p[1].GetValueAsDouble();

return Math.Pow(x, Math.Floor(y));

INTTOASC

Summary:

Converts integer to ascii character value.

Parameters:

Integer value to convert

Internal code:

double doubleintvalue = p[0].GetValueAsDouble();

Int32 intvalue = System.Convert.ToInt32(doubleintvalue);

string testString;

Char testChar;

testChar = System.Convert.ToChar(intvalue);

testString = testChar.ToString();

return testString;

LN

Summary:

Returns the natural (base e) logarithm of a specified number.

Parameters:

Value to convert

Internal code:

return Math.Log(p[0].GetValueAsDouble());

LOG

Summary:

Returns the base 10 logarithm of a specified number.

Parameters:

Value to convert

Internal code:

return Math.Log(p[0].GetValueAsDouble())/Math.Log(10);

LOGN

Summary:

Returns the base logn of a specified number.

Parameters:

Value to convert

Internal code:

return Math.Log(p[0].GetValueAsDouble())/Math.Log(p[1].GetValueAsDouble());

LOWBYTE

Summary:

Returns the low byte of a word.

Parameters:

Value to convert

Internal code:

double rawAsDouble = p[0].GetValueAsDouble();

UInt16 intVal = Convert.ToUInt16(rawAsDouble);

byte[] bytes = BitConverter.GetBytes(intVal);

if (BitConverter.IsLittleEndian)

return bytes[0];

else

return bytes[1];

LOWWORD

Summary:

Returns the low word of an integer.

Parameters:

Value to convert

Internal code:

double rawAsDouble = p[0].GetValueAsDouble();

UInt32 intVal = Convert.ToUInt32(rawAsDouble);

byte[] bytes = BitConverter.GetBytes(intVal);

UInt16 tempWord;

if (BitConverter.IsLittleEndian)

tempWord = BitConverter.ToUInt16(bytes, 0);

else

tempWord = BitConverter.ToUInt16(bytes, 2);

return tempWord;

LTRIM

Summary:

Removes all leading occurrences spaces from a string.

Parameters:

String to convert.

Internal code:

IConvertible o = p[0].GetValue();

if(o is String)

{

return ((String)o).TrimStart();

}

return Convert.ToString(o).TrimStart();

MAX

Summary:

Returns highest value of 2 values.

Parameters:

First value to evaluate.

Second value to evaluate.

Internal code:

double x__ = p[0].GetValueAsDouble();

double y__ = p[1].GetValueAsDouble();

if (x__ > y__)

return x__;

else

return y__;

MEDIAN

Summary:

Returns median value from multiple values.  If an even number of values then it returns the average of the middle 2 numbers.

Parameters:

Each value to evaluate in the median calculation.

Internal code:

Complex

MIN

Summary:

Returns lowest value of 2 values.

Parameters:

First value to evaluate.

Second value to evaluate.

Internal code:

double x__ = p[0].GetValueAsDouble();

double y__ = p[1].GetValueAsDouble();

if (x__ < y__)

return x__;

else

return y__;

MOD

Summary:

Returns the modulus of parameter 1 with parameter 2 value applied.

Parameters:

Number to evaluate.

Operator.

Internal code:

double x = p[0].GetValueAsDouble();

double y = p[1].GetValueAsDouble();

int p1 = (int)Math.Floor(x);

int p2 = (int)Math.Floor(y);

return p1 % p2;

MOVMAX

Summary:

Returns the highest value over a specified time period.

Parameters:

Tag value to evaluate in the moving maximum.

Time period to evaluate in seconds.

Internal code:

Complex code using arrays of values and timestamps.

MOVMIN

Summary:

Returns the lowest value over a specified time period.

Parameters:

Tag value to evaluate in the moving minimum.

Time period to evaluate in seconds.

Internal code:

Complex code using arrays of values and timestamps.

MOVSUM

Summary:

Returns the total of all samples over a specified time period.

Parameters:

Tag value to evaluate in the moving summation.

Time period to evaluate in seconds.

Internal code:

Complex code using arrays of values and timestamps.

POW

Summary:

Returns a specified number raised to the specified power.

Parameters:

Number to be raised to  a power.

The power.

Internal code:

double x = p[0].GetValueAsDouble();

double y = p[1].GetValueAsDouble();

return Math.Pow(x, y);

REPLACE

Summary:

Returns a string with all occurrences matching the string value of parameter 2 replaced with the string value of parameter 3.

Parameters:

String to evaluate.

String to search for.

String to replace the occurrences found.

Internal code:

string stringValue = p[0].GetValueAsString();

string stringToCheck = p[1].GetValueAsString();

string stringToReplace = p[2].GetValueAsString();

return stringValue.Replace(stringToCheck, stringToReplace);

RND

Summary:

Returns a random number.

Parameters:

None.

Internal code:

if(random==null)

{

random = new Random();

}

return random.NextDouble();

RTRIM

Summary:

Removes all ending occurrences spaces from a string.

Parameters:

String to convert.

Internal code:

IConvertible o = p[0].GetValue();

if(o is String)

{

return ((String)o).TrimEnd();

}

return Convert.ToString(o).TrimEnd();

SIGN

Summary:

Returns 1 if value is greater than 0.  Returns -1 if less than 0.  Returns 0 if equal to 0.

Parameters:

Value to evaluate.

Internal code:

double x__= p[0].GetValueAsDouble();

if (x__ < 0)

return -1;

else

if (x__ > 0)

return 1.0;

else

return 0.0;

SIN

Summary:

Returns the sine of the specified angle.

Parameters:

An angle, measured in radians.

Internal code:

return Math.Sin(p[0].GetValueAsDouble());

SINH

Summary:

Returns the hyperbolic sine of the specified angle.

Parameters:

An angle, measured in radians.

Internal code:

double d = p[0].GetValueAsDouble();

return (Math.Exp(d)-Math.Exp(-d))*0.5;

SQR

Summary:

Returns the square of a specified number.

Parameters:

Value to convert.

Internal code:

double d = p[0].GetValueAsDouble();

return (d*d);

SQRT

Summary:

Returns the square root of a specified number.

Parameters:

Value to convert.

Internal code:

return Math.Sqrt(p[0].GetValueAsDouble());

STARTSWITH

Summary:

Returns true if string starts with the second string parameter.

Parameters:

String to evaluate.

String to check for.

Internal code:

String temp = p[0].GetValueAsString();

String temp2 = p[1].GetValueAsString();

if (temp.StartsWith(temp2))

return 1;

else

return 0;

STR

Summary:

Converts a number to a string.

Parameters:

Number to convert.

Internal code:

IConvertible o = p[0].GetValue();

if (o is String)

{

return o;

}

return Convert.ToString(o);

STRFORMT

Summary:

Converts a number to a string with the format of the second parameter.  For valid format codes search for .NET ToString Format.

Parameters:

Number to convert.

String containing format codes.

Internal code:

IConvertible o = p[0].GetValue();

string formatstring = p[1].GetValueAsString();

if (o is String)

{

return o;

}

else

{

double tempDouble = System.Convert.ToDouble(o);

return tempDouble.ToString(formatstring);

}

STRLEN

Summary:

Returns the length of a string.

Parameters:

String to evaluate.

Internal code:

String temp = p[0].GetValueAsString();

return Convert.ToDouble(temp.Length);

SUBSTR

Summary:

Returns a substring of a string.

Parameters:

String to evaluate.

Starting position within the string.

Length of string to return.

Internal code:

String s = p[0].GetValueAsString();

int start = (int)(p[1].GetValueAsDouble());

int length    =  (int)(p[2].GetValueAsDouble());

length = Math.Min(length, s.Length-start);

if (s == “0”)

return “0”;

return s.Substring(start,length);

SUM

Summary:

Summation of all values.

Parameters:

Values to sum.  As many parameters as you desire.

Internal code:

double total = 0;

for(int i=0; i<p.Length; i++)

{

total += p[i].GetValueAsDouble();

}

return total;

TAN

Summary:

Returns the tangent of the specified angle.

Parameters:

An angle, measured in radians.

Internal code:

return Math.Tan(p[0].GetValueAsDouble());

TRIM

Summary:

Removes all occurrences of spaces from a string.

Parameters:

String to convert.

Internal code:

IConvertible o = p[0].GetValue();

if(o is String)

{

return ((String)o).Trim();

}

return Convert.ToString(o).Trim();

TRUNC

Summary:

Truncates a value to the nearest integer.

Parameters:

Value to convert.

Internal code:

double x__ = p[0].GetValueAsDouble();

if (x__>=0)

{

return Math.Floor(x__);

}

else

{

return Math.Ceiling(x__);

}

UNIXTODATETIME

Summary:

Returns a string of the date and time with passing in the number of seconds since 1970.

Parameters:

Number of seconds since 1970.

String containing format codes.

Internal code:

double seconds = p[0].GetValueAsDouble();

string formatstring = p[1].GetValueAsString();

DateTime dt1970 = new DateTime(1970, 1, 1).AddSeconds(seconds);

return dt1970.ToString(formatstring);

VAL

Summary:

Converts a string to a number.

Parameters:

String to convert.

Internal code:

IConvertible o = p[0].GetValue();

if(o is String)

{

return Convert.ToDouble((String)o);

}

return Convert.ToDouble(o);

Alarm Limits

Each tag can have adjustable or fixed alarm limits for High High, High, Low, Low Low, Rate of Change, or Digital alarms.

The video below is a 7 minute explanation of setting up Alarm Limits:

  • 00:00 – How to set up alarms limits
  • 00:24 – Programmatically Configure Tags
  • 01:34 – Another way to adjust the alarm limit
  • 02:17 – Alarms Group
  • 02:52 – Alarm Priority
  • 03:07 – Time Delay
  • 03:18 – Alarm Text
  • 04:55 – Alarm Tracking
  • 05:29 – Alarms Limits
  • 06:26 – Boolean Signals
  • 06:34 – Example Applications Videos
  • 07:07 – More Questions

Enable Alarm

To enable an Alarm Limit for a tag, check the Enable Alarm box at the top of the properties window. To enable an Alarm Limit with a tag, check the Enable with Tag.. box instead. Then use the Browse button that appears to select the tag you wish to use to enable the alarm.

Alarm Limit Source

Use the Alarm Limit Source drop down to specify the source of the alarm limit. If value is selected, enter a numeric value in the High High Limit box below. Other options include another tag or a calculation. Setting a Deadband for the alarm limit specifies an amount that the value must be within the limit before the alarm condition is cleared. When the tag value goes above the Out of Range value the alarm limit is not evaluated and the alarm is disabled.

Disabling an Alarm

Checking the Date Disable… box brings up Start and End fields; use these to disable an alarm for a date/time range. Checking the Daily Disable… box brings up hour and seconds fields; use these to disable an alarm for a certain time period each day.

Alarm Text

Use the Alarm Text box to enter the text that will be displayed in alarm notifications, on and HMI screens and recorded in alarm logging. There are five ways to set the alarm text using the Alarm Text Type dropdown.

  1. Static Alarm Text: displays the Alarm Text as is.
  2. Preset Alarm Text: brings up a Browse button to select a Dynamic Text Tag whose value will prepend the Alarm Text.
  3. Overwrite Alarm Text: brings up a Browse button to select a Dynamic Text Tag whose value will overwrite the Alarm Text.
  4. Append Alarm Text: brings up a Browse button to select a Dynamic Text Tag whose value will be appended to the Alarm Text.
  5. Calculation: allows you to create a Calculation using the Edit button to produce the Alarm Text.

Alarm Groups and Priority

Use the Group dropdown to select a an existing group to categorize an Alarm. You can also create a new group by typing into the Group dropdown. Once you have Applied Changes to the tag, the new group will be available for other alarms. Groups are used for filtering alarms for notifications, alarm logging and HMI. You can also enter a numeric Priority for each alarm. The valid range is from 0 to 2,147,483,647. This is another way to filter and organize alarms.

Other Alarm Properties

Time Delay: The Time Delay in seconds that the alarm condition must remain active before the alarm is posted as an active alarm. The date and time when the alarm first became active is used as the alarm date and time, not the date and time it was posted as an active alarm. If you would Like the AlarmStatus parameter To be Set immediate And Not wait For the Time Delay use Configure-Options To Set Update Alarm Status Immediately without Alarm Time Delay.

Log as Event: Enabling this will have record the alarm as a single event when the alarm limit is reached. It will not have an acknowledged state.

Document: Use this to associate a document with the alarm. It could be displayed for an operator in an HMI screen.

Trend Point: Check this to make the alarm limit available for trending.

Source When Bad: Allows the value and data quality to be overridden when the value quality is bad.

  1. Normal Bad Quality: When the data source is bad quality the result is bad quality. With Calculations any one of the source tags in the calculation being bad quality will cause the result to be bad quality.
  2. Set Sources To Default Value: When the data source quality is bad the source value is overridden to be what is set as Default Value with the data type of Default Value Type.
  3. Hold Sources To Last Good Value:  When the data sources quality changes to bad quality the last good value will be used as the data source. 
  4. Set Sources To Tag Value: When the data sources quality is bad the value from another Open Automation Software Tag will be used.

Enable Time on and Counts: See the Knowledge Base article, Time On and Counts, for more information.

Save and Load Tags

Save Tags

Save Button

If modifications are made to the current Tag configuration for the Service, make sure to save the changes if you want the changes to be retentive when the Service restarts.

Use Configure – Options to specify the default Tag configuration to load on the start of the Service.

Load Tags

Load Button

Use this selection to load a previously stored Tag configuration. This option is not available is the Service is in Runtime mode.

Use Configure – Options to set the default Tag configuration to load when the Service first starts.

Parameter Properties

Tag Properties

Tag Name

The Tag Name is used to identify the specific point and all of its parameters. The Tag can be included within a Group.

For example the following would be the full path for a Tag within a Group:

  • myGroup.myTag
  • The client applications will reference the tag name and parameter by name.
  • myGroup.myTag.Value, myGroup.myTag.AlarmStatusHighHigh, or myGroup.myTag.ValueTimeOn.

Data Type

The data type of a Parameter can be set to one of the following types:

  • Double Float (64 bit)
  • Unsigned Byte (8 bit)
  • Integer (32 bit)
  • Unsigned Long Integer (64 bit)
  • Array Double (64 bit)
  • Array Bool
  • Single Float (32 bit)
  • Short Integer (16 bit)
  • Unsigned Integer (32 bit)
  • Boolean
  • Array Integer (32 bit)
  • Object Type  (Any custom object, array, or structure)
  • Signed Byte (8 bit)
  • Unsigned Short Integer (16 bit)
  • Long Integer (64 bit)
  • String
  • Array Single (32 bit)
  • Array Byte (8 bit)

Reset Value to False

When enabled for a Boolean Tag a write of False will be sent immediately when the value transitions from False to True.

Trend Point

Enable Trend Point to have the Parameter available for trending from OAS Trend .NET and OAS Web Trend. You can data log a Parameter value without trending the point if desired.

Value

The current value of the Parameter. The source of the Value is determined by the Data Source. If the Data Source is set to Value this remains fixed and can be changed directly. All other Data Sources will determine what the Value is.

Gain

The Gain is a multiplier to the raw incoming value except when the Data Source is Value:

Value = RawValue * Gain + Offset

When writing to an OPC Item the calculation is reversed:

OutputValue = (Value – Offset) / Gain

Offset

The Offset is an addition to the raw incoming value except when the Data Source is Value:

Value = RawValue * Gain + Offset

When writing to an OPC Item the calculation is reversed:

OutputValue = (Value – Offset) / Gain

High Range

The default Y Axis Range High for a trend pen.

Low Range

The default Y Axis Range Low for a trend pen.

Read Only

The value of the parameter cannot be written to.

Out Of Range

The limit if the value exceeds the alarm will be disabled.

An example is the High Alarm Limit is set to 80 and the Out Of Range is set to 1000:

  • If the Value is below 80 there is no alarm.
  • If the Value is greater than 80 and less than 1000 the tag is in a High Alarm State.
  • If the Value is 1000 or greater there is no alarm.

Alarm Limit

The current value of the alarm limit Parameter. The source of the Alarm Limit is determined by the Data Source.  If the Data Source is set to Value this remains fixed and can be changed directly. All other Data Sources will determine what the Alarm Limit is.

ROC Alarm Type

There are three (3) Rate of Change alarm types:

  1. Negative And Positive alarms on a rise or fall of the value by more than the limit.
  2. Negative Only alarms on a fall of the value by more than the limit.
  3. Positive Only alarms on a rise of the value by more than the limit.

Data Source

The source of where the value will come from. The Data Source can be set to one of the following types:

  • Value: Fixed value that can be set in configuration or from any client.
  • Modbus: Modbus master communications for Modbus TCP, Modbus RTU, and Modbus ASCII all supported on both Ethernet and Serial interfaces.
  • ABLogix: Communications to Allen Bradley ControlLogix, CompactLogix, GuardLogix, and Micro800.
  • ABClassic: Communications to Allen Bradley MicroLogix, SLC 500, and PLC-5.
  • Siemens: Communications to Siemens S7-200, S7-300, S7-400, S7-1200, and S7-1500.
  • MQTT: Communications to MQTT brokers to send and receive data to MQTT devices and software.
  • OPC Item: Value from OPC Server Item specified in the OPC Item field.  View the following video for quick instructions on defining an OPC Item.
  • Tag: Value is from another tag parameter from the same service or remote service. The result is read only and cannot be written to.
  • Calculation: Math equation with multiple tag parameters as a data source. The result is read only and cannot be written to. View the following video to see how to define a Calculation.
    • Year: The current year as an Integer. Value is read only.
    • Month: The current month as an Integer. Value is read only.
    • Day: The current day as an Integer. Value is read only.
    • Hour: The current hour as an Integer. Value is read only.
    • Minute: The current minute as an Integer. Value is read only.
    • Second: The current second as an Integer. Value is read only.
    • SecondToday: The total number of seconds elapsed in the current day as an Integer. Value is read only.
    • Weekday: The current weekday as an Integer. Value is read only.  0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday.
    • WeekdayName: The current weekday as a String. Value is read only.
    • DateTimeString: The current date and time as a String. Value is read only.
    • UTCYear: The current Universal Time Code year as an Integer. Value is read only.
    • UTCMonth: The current Universal Time Code month as an Integer. Value is read only.
    • UTCDay: The current Universal Time Code day as an Integer. Value is read only.
    • UTCHour: The current Universal Time Code hour as an Integer. Value is read only.
    • UTCMinute: The current Universal Time Code minute as an Integer. Value is read only.
    • UTCSecond: The current Universal Time Code second as an Integer. Value is read only.
    • UTCSecondToday: The total number of seconds elapsed in the current Universal Time Code day as an Integer. Value is read only.
    • UTCWeekday: The current Universal Time Code weekday as an Integer. Value is read only.  0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday.
    • UTCWeekdayName: The current Universal Time Code weekday as a String. Value is read only.
    • UTCDateTimeString: The current Universal Time Code date and time as a String. Value is read only.
    • UDPClientTag: Remote tag from another service that is setup for UDP Broadcast. Value is read only.
    • FileBinary: Reads value from binary file with the file name of the full tag path and parameter name and extension .bin located in the directory specified in the File Data Source Path parameter under Configure-Options. When value is written to Tag the file will be updated with new value.
    • FileText: Reads value from text file with the file name of the full tag path and parameter name and extension .txt located in the directory specified in the File Data Source Path parameter under Configure-Options. When value is written to Tag the file will be updated with new value.

  • FileXML: Reads value from xml file with the file name of the full tag path and parameter name and extension .xml located in the directory specified in the File Data Source Path parameter under Configure-Options. When value is written to Tag the file will be updated with new value.

Tag Data Source

Path of the Tag and Parameter for the value if the data source is selected as Tag. This can be tag value from a remote service with the syntax of \Network Node or IP AddressTag.Value.

Source When Bad

Allows the value and data quality to be overridden when the value quality is bad when the Data Source is set to OPC Item, Tag, Calculation, or UDP Client Tag.

The following are the three (3) available options for Source When Bad:

  1. Normal Bad Quality: When the data source is bad quality the result is bad quality. With Calculations any one of the source tags in the calculation being bad quality will cause the result to be bad quality.
  2. Set Sources To Default Value: When the data source quality is bad the source value is overridden to be what is set as Default Value with the data type of Default Value Type. With Calculations that have multiple tag parameters as a source each individual tag value in the calculation will be set to the Default Value when its individual data quality is bad. This will result in the calculation performing the equation with the remaining actual values with tags with good quality and overriding the values for the tags that are bad quality.
  3. Hold Sources To Last Good Value: When the data sources quality changes to bad quality the last good value will be used as the data source.  With Calculations that have multiple tag parameters as a source each individual tag value in the calculation will be held with its last good value when its individual data quality is bad. This will result in the calculation performing the equation with remaining actual values with tags with good quality and overriding the values for the tags that are bad quality with each individual tags last good quality.
  4. Set Sources To Tag Value: When the data sources quality is bad the value from another Open Automation Software Tag will be used.  With Calculations that have multiple tag parameters as a source each individual tag value in the calculation will be set from the other Tag value. This will result in the calculation performing the equation with remaining actual values with tags with good quality and overriding the values for the tags that are bad quality with the assigned tag’s value.

Source Tag On Bad Quality

When Source When Bad is set to Set Sources To Tag Value this is the tag parameter to use for the value to set the source when the data quality is bad.

Default Value Type

The data type to use when the Source When Bad is set to Set Sources to Default Value. See Source When Bad for full description.

Default Value

The value to use when the Source When Bad is set to Set Sources to Default Value.  See Source When Bad for full description.

Override OPC Quality On Bad Quality

Forces the OPC Quality that is passed onto the OPC Systems.NET OPC Server to good quality when the Data Source When Bad Quality is set to something other than the default of Normal Bad Quality and the Data Source is set to an OPC Item.

OPC Update Rate

Update rate of the OPC Item for the value if the data source is selected as OPC Item.

Keep OPC Item On Scan

With this option selected the communications to the OPC Item will always be enabled unless the Device Read option is selected.

When this option is disabled communications to the OPC Item will be enabled only when one or more clients are requesting the value from the Tag. If the point is trended, enabled for alarm monitoring with any one of the alarm limits enabled, or set as a Target output to another OPC Item this OPC Item will always be on scan regardless if there is a requesting client.

Note: Not recommended for OPC Items from RS-Linx OPC Server as it does not handle dynamic adding and removing items well.

OPC Access Path

OPC Access Path of the OPC Item for the value if the data source is selected as OPC Item.  Most OPC Servers do not require this parameter, only servers that need to have a special topic like old DDE servers that have been converted to support OPC.

OPC Enable by Tag

When this option is enabled a Boolean Tag is defined to enable or disable OPC asynchronous communications.

Note: For standard asynchronous communications this should not be enabled.

Device Read

When enabled the Boolean Tag that is specified will cause a one-time read of OPC data when it transitions from False to True. Also when this attribute is enabled the normal asynchronous connection is disabled and the item is only polled on the transition from False to True for the Device Read Tag specified.

When a read is performed it informs the OPC Server to do a Device Read from the device to obtain the very latest value at that time.

Note: For standard asynchronous communications this should not be enabled.

OPC Enumerate

This is a list of string values returned from the OPC Server Browse that represent the specific meaning for each integer value that is returned from the OPC Item.

The string arrays are separated by a pipe character ‘|’.

Enumerate Index

If the integer value for OPC Enumerate does not begin with 0 or is not continuous numbers to convert to the string array for OPC Enumerate you can enable Enumerate Index to provide an index array of integer values to convert to.

Following is an example:

  • The value 123 should result in the string value Test0.
  • The value 456 should result in the string value Test1.
  • The value 789 should result in the string value Test2.
  • All other values will result in bad quality.
  • In OPC Enumerate specify Test0|Test1|Test2
  • In Enumerate Index specify 123|456|789
  • The integer arrays are separated by a pipe character ‘|’.

Description

Description of the Tag used as the default Trend Pen Description.

Also used as the default Alarm Text when an Alarm Limit is first enabled.

Units

Engineering Units of the Tag used as the default Trend Pen Units.

Document

This is typically a URL path to launch a document that is sent to the Windows and Web alarm windows when an alarm occurs. It can also be used for your own document purposes as a string to launch other documents from a .NET or web application.

Enable Alarm

Select each desired alarm limit to enable the alarm evaluation.

Alarm Enable With Tag

This property allows a Boolean Tag to be defined that will control if the Alarm Limit is enabled or disabled.

Alarm Group

Used in .Net Alarm and Web Alarm components and alarm logging for filtering alarms based on group. Simply enter the new alarm group or select from the existing list of groups.  OPC, System, and Tag Client are default alarm groups used to identify system and communication alarms.

Alarm Priority

Used in .NET Alarm and Web Alarm components and alarm logging for filtering alarms based on priority. The valid range is from 0 to Int32.Max.

Deadband

For Analog Alarm Limits the amount that the value must be within the limit before the alarm condition is cleared.

Time Delay

The time delay in seconds that the alarm condition must remain active before the alarm is posted as an active alarm. The date and time when the alarm first became active is used as the alarm date and time, not the date and time it was posted as an active alarm.

If you would like the AlarmStatus parameter to be set immediate and not wait for the Time Delay use Configure-Options to set Update Alarm Status Immediately without Alarm Time Delay.

Alarm Text

Description of the Tag used as the alarm text when the alarm is active.

Also used as the Alarm Text for .NET Alarm and Web Alarm components and Alarm Logging.

The Alarm Text can be fixed or dynamic with the Dynamic Alarm Text attribute.

Dynamic Alarm Text

The Alarm Text of an alarm message can be dynamic based on other Tag values.

The following options can be used for changing the Alarm Text:

  • Static Alarm Text: No change to the alarm text is performed, the default Alarm Text is used.
  • Prepend Alarm Text: Adds the value of the dynamic alarm text tag ahead of the base Alarm Text.
  • Overwrite Alarm Text: Replaces the alarm text entirely with the value of the dynamic alarm text tag.
  • Append Alarm Text: Appends the value of the dynamic alarm text after the base Alarm Text.

When the alarm occurs the current value of the alarm message is locked for that instance of the alarm so when it is acknowledged or it clears the message is the same for all states.

Alarm Text Append True

The text that can be appended to the static or dynamic alarm text for a Digital Alarm Limit when the value is true.

Alarm Text Append False

The text that can be appended to the static or dynamic alarm text for a Digital Alarm Limit when the value is false.

Log As Event

When the Value reaches the alarm limit the event will not be indicated and recorded as an alarm with acknowledge state, but instead as an event that just records the one instance of when it reaches the alarm limit.

Time Stamp Offset

The amount of time to offset the alarm timestamp to match a particular time zone.  If you prefer to use Universal Time Code enable the property Use UTC Timestamp under Configure-Options.

Daily Disable

Disable the alarm daily between the Start Hour and Minute and the End Hour and Minute.

Date Disable

Disable the alarm between the Start date and End date.

Units / Hour

The alarm limit for Rate of Change alarms that is specified in Units per Hour.

Use the Sample Rate to determine how frequently to compare the rate of change.

Sample Rate

The sampling rate in seconds on how frequently the rate of change alarm is evaluated.

Acknowledge Alarm Groups

Enable this feature to automatically acknowledge all alarms defined to the alarm groups defined in the property Alarm Groups to Acknowledge. The alarms are acknowledged when the Tag Value transitions from False to True.

If the Tag Value remains True no further acknowledge will occur until the value goes to False and then True again. If you desire to acknowledge all alarms in the local service leave the Alarm Groups to Acknowledge field blank.

Alarm Groups To Acknowledge

When the Acknowledge Alarm Groups property is enabled this is the list of Alarm Groups that will determine which alarms will be acknowledged automatically when the Tag Value transitions from False to True. If you desire to acknowledge all alarms in the local service leave this field blank.

Target Enable Write to OPC Item

Enables the OPC Route feature to send the Tag Value to an OPC Item.

This feature is not required to just write to an OPC Item from a client application. If the Data Source of a Tag is set to OPC Item and write occurs to the Tag the OPC Item will be written to.

The Target feature is mainly used to transfer values from OPC Servers to other OPC Servers or Calculation results to OPC Servers. Often used for remote data transfer over the Internet from OPC Server to OPC Server.

Target OPC Item

The OPC Item to write the Tag Value to.

Target Update Rate

The OPC Update Rate for the Target OPC Item.

Target OPC Access Path

The OPC Access Path of the OPC Item to write the Tag Value to. Most OPC Servers do not require this parameter, only servers that need to have a special topic like old DDE servers that have been converted to support OPC.

Target Float Deadband

For floating point values this is the amount to compare with current value from OPC Item and if within range it does not write a new value. If the source Value is different than the current Target OPC Item value by more than the Float Deadband a write will occur.

Target Write Continuously

When this property is disabled writes will only occur when the source Value is different than the target OPC Item.

When this property is enabled writes will continuously be performed at the rate of Target Write Continuously Frequency even if the source Value is the same as the target OPC Item value.

Note: When this feature is changed either the source Value must change or restart the service for the parameter to take effect.

Target Write Continuously Frequency

The rate at which the value is written to the destination if the continuous writing is enabled.

When this property is enabled writes will continuously be performed at the rate of Target Write Continuously Frequency.

Note: When this feature is changed either the source Value must change or restart the service for the parameter to take effect.

Tag Parameters

Value

Value Parameter

Each Tag has a Value Parameter which acts as the Tag’s value for evaluating alarm conditions. All parameter types can be trended and data logged, but this is usually the default value for those features.

High High Limit Parameter

Each Tag has a High High Limit Parameter which acts as the Tag’s High High Alarm Limit for evaluating alarm conditions from the Value Parameter.  If the value of the Value Parameter exceeds the High High Limit the Tag is considered to be in a High High alarm condition.

High Limit Parameter

Each Tag has a High Limit Parameter which acts as the Tag’s High Alarm Limit for evaluating alarm conditions from the Value Parameter.  If the value of the Value Parameter exceeds the High Limit the Tag is considered to be in a High alarm condition.

Low Limit Parameter

Each Tag has a Low Limit Parameter which acts as the Tag’s Low Alarm Limit for evaluating alarm conditions from the Value Parameter.  If the value of the Value Parameter exceeds the Low Limit the Tag is considered to be in a Low alarm condition.

Low Low Limit Parameter

Each Tag has a Low Low Limit Parameter which acts as the Tag’s Low Low Alarm Limit for evaluating alarm conditions from the Value Parameter.  If the value of the Value Parameter exceeds the Low Low Limit the Tag is considered to be in a Low Low alarm condition.

Digital Limit Parameter

Each Tag has a Digital Limit Parameter which acts as the Tag’s Digital Alarm Limit for evaluating alarm conditions from the Value Parameter.  If the value of the Value Parameter equals the Digital Limit the Tag is considered to be in a Digital alarm condition.

Rate of Change Limit Parameter

Each Tag has a Rate of Change Limit Parameter which acts as the Tag’s Rate of Change Alarm Limit for evaluating alarm conditions from the Value Parameter.  If the value of the Value Parameter changes by more than the Units / Minute limit between samples that are sampled at the Sample Rate the Rate of Change Limit the Tag is considered to be in a ROC alarm condition.

Target Parameter

Each Tag has a Target Parameter that can be enabled to write a value back to an OPC Item. Because each Tag can have another Tag as a data source a Tag value can be transferred to unlimited numbers of OPC Items on both a local OAS Service or on other remote OAS Services.

Delete Group

To delete a Group of the selected Service select the desired Group and perform one of the following:

  • Right click on the Group and select Delete.

Delete Group

  • Use the Delete key on the Keyboard.

To delete all Tags and Groups in the configuration select the top  Tags Group and right click on the top object and select Delete All.

Delete All Tags

Delete Tag

To delete a Tag of the selected Service select the desired Tag and perform one of the following:

  • Right click on the Tag and select Delete.

Delete Tag

  • Use the Delete key on the Keyboard.

To delete all Tags and Groups in the configuration select the top Tags Group and right click and select Delete All.

Delete All Tags

Add Tag

To add a Tag to the Service at the Root Level select the Tags Group at the top and perform one of the following:

  • Right click on the Tags Group and select Add Tag.

Add Tag

  • Or select the Add Tag Button on the Menu Bar.

Add Tag

To add a Tag to a Group select the desired Group and perform one of the following:

  • Right click on the Group and select Add Tag.

Add Tag

  • Or select the Add Tag Button on the Menu Bar.

Add Tag

Add Group

To add a Group to the Service at the Root Level select the Tags Group at the top and perform one of the following:

  • Right click on the Service and select Add Group.

Add Group

  • Or select the Add Group Button on the Menu Bar .

Add Group

To add a Group to a Group select the desired Group and perform one of the following:

  • Right click on the Group and select Add Group.

 Add Group

  • Or select the Group and select the Add Group Button on the Menu Bar .

Add Group