FAQ No. 53. ihost: Logic Points. Roles and Privileges. Adding and removing logic points. Accessing and using the Logic Editor

Similar documents
Limnor Studio User s Guide

Arithmetic and Bitwise Operations on Binary Data

Lecture 14. Daily Puzzle. Math in C. Rearrange the letters of eleven plus two to make this mathematical statement true. Eleven plus two =?

Operators. Java operators are classified into three categories:

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements

Arithmetic and Logic Blocks

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Expressions. Eric McCreath

GO - OPERATORS. This tutorial will explain the arithmetic, relational, logical, bitwise, assignment and other operators one by one.

9 Using Equation Networks

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University

JAVA OPERATORS GENERAL

Expressions and operators

Outline. Data and Operations. Data Types. Integral Types

Operators and Expressions in C & C++ Mahesh Jangid Assistant Professor Manipal University, Jaipur

Chapter 4 Section 2 Operations on Decimals

Le L c e t c ur u e e 2 To T p o i p c i s c t o o b e b e co c v o e v r e ed e Variables Operators

Arithmetic and Bitwise Operations on Binary Data

Introduction to Computer Programming in Python Dr. William C. Bulko. Data Types

Beginning C Programming for Engineers

A complex expression to evaluate we need to reduce it to a series of simple expressions. E.g * 7 =>2+ 35 => 37. E.g.

(Type your answer in radians. Round to the nearest hundredth as needed.)

Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups:

Chapter 3 : Computer Science. Class XI ( As per CBSE Board) Data Handling. Visit : python.mykvs.in for regular updates

Quick Reference Guide

Bits, Words, and Integers

Using the um-fpu with the Javelin Stamp

SOFTWARE DEVELOPMENT 1. Operators 2018W A. Ferscha (Institute of Pervasive Computing, JKU Linz)

Quick Reference Guide

How to Design Programs Languages

Single row numeric functions

CIS 110: Introduction to Computer Programming

Expression and Operator

Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3

Exploring Little Numbers

10 Using the PCFL Editor In this chapter

Chapter 4. Operations on Data

Number Systems CHAPTER Positional Number Systems

Macro Programming Reference Guide. Copyright 2005 Scott Martinez

Operators in C. Staff Incharge: S.Sasirekha

Logic, Words, and Integers

CT 229. Java Syntax 26/09/2006 CT229

Unit 3. Operators. School of Science and Technology INTRODUCTION

XQ: An XML Query Language Language Reference Manual

The Arithmetic Operators. Unary Operators. Relational Operators. Examples of use of ++ and

The Arithmetic Operators

Numerical Data. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

Chapter 1 Introduction to MATLAB

JUN / 04 VERSION 7.0

Computer Organisation CS303

2/5/2018. Expressions are Used to Perform Calculations. ECE 220: Computer Systems & Programming. Our Class Focuses on Four Types of Operator in C

Binary Values. CSE 410 Lecture 02

Chapter 3: Operators, Expressions and Type Conversion

4. Number Representations

COMP 122/L Lecture 2. Kyle Dewey

Script started on Thu 25 Aug :00:40 PM CDT

Computers Programming Course 6. Iulian Năstac

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2

9/2/2016. Expressions are Used to Perform Calculations. ECE 120: Introduction to Computing. Five Arithmetic Operators on Numeric Types

1/31/2017. Expressions are Used to Perform Calculations. ECE 120: Introduction to Computing. Five Arithmetic Operators on Numeric Types

Expressions. Operands. Operators

2.1. Unit 2. Integer Operations (Arithmetic, Overflow, Bitwise Logic, Shifting)

carry in carry 1101 carry carry

Chapter 03: Computer Arithmetic. Lesson 09: Arithmetic using floating point numbers

But first, encode deck of cards. Integer Representation. Two possible representations. Two better representations WELLESLEY CS 240 9/8/15

Primitive Data Types: Intro

Objectives. Introduce the core C# language features class Main types variables basic input and output operators arrays control constructs comments

UNIT 3 OPERATORS. [Marks- 12]

Introduction. Following are the types of operators: Unary requires a single operand Binary requires two operands Ternary requires three operands

EE292: Fundamentals of ECE

Arithmetic Operators. Portability: Printing Numbers

Unit-2 (Operators) ANAND KR.SRIVASTAVA

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Number Systems and Computer Arithmetic

Introduction to Programming with Python: overview

Here n is a variable name. The value of that variable is 176.

Introduction to C Language

Chapter 2. Outline. Simple C++ Programs

CS313D: ADVANCED PROGRAMMING LANGUAGE

Bits, Bytes and Integers

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Introduction to Programming with Python

Informatics Ingeniería en Electrónica y Automática Industrial

Methods: A Deeper Look

MATHEMATICAL / NUMERICAL FUNCTIONS

Expressions and Precedence. Last updated 12/10/18

Advanced Algorithms and Computational Models (module A)

UNIT- 3 Introduction to C++

Prof. Navrati Saxena TA: Rochak Sachan

What did we talk about last time? Examples switch statements

Maths Functions User Manual

COMP Primitive and Class Types. Yi Hong May 14, 2015

Goals for This Lecture:

cast int( x float( x str( x hex( int string int oct( int string int bin( int string int chr( int int ord( ch

Learning the Language - V

Chapter 3 Basic Data Types. Lecture 3 1

Operators & Expressions

Long (or LONGMATH ) floating-point (or integer) variables (length up to 1 million, limited by machine memory, range: approx. ±10 1,000,000.

SECTION 1: INTRODUCTION. ENGR 112 Introduction to Engineering Computing

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

Transcription:

ihost: Logic Points In addition to displaying values reported by a unit, ihost supports adding additional logic points to a unit and calculating the value based on a custom logic expression. On calculation of a new value, an event will be created (routine host datalogging must be enabled for analogues) that may be plotted on Interactive Trends and notified to users just the same as regular points. This feature is currently supported for binary inputs, counter inputs and analogue inputs. Roles and Privileges As you should know not all Users can see all pages, links and menu items. It might be that some of the screen shots shown below do not match with what you see this is nothing to worry about. If you are not able to access some of the pages you would like too then please contact your ihost administration team. Adding and removing logic points Logic points can be added via the UI from 2.38 onwards. This is available via a link on the point settings page. Note, there is currently no support for removing logic points once added. Existing logic points can be enabled / disabled via the settings pages. If additional logic points are required for an ihost on version less than 2.38 then please contact technical support. Accessing and using the Logic Editor The logic expression associated with a logic point may be modified using the built-in Logic Editor. The Logic Editor can be accessed for a single point via the Unit Overview or the input settings page. On the Unit Overview, click the calculator icon shown next to the trend graph icon: On the binary input settings page click the Edit link: The logic expression is always validated on saving changes. Also the interval can be updated which is the period between evaluating a logic expression. The interval must be a minimum of 60 seconds. Nortech Management Ltd, United Kingdom Page 1 of 13

For Nexus and Bowden P360 units, the logic evaluation can be triggered on a call. This expression will run independent of whether the call failed or was successful as long as the logs were processed and points were updated. Nortech Management Ltd, United Kingdom Page 2 of 13

Logic point types The following point types can be logic points: Type Counter Input Expected Return Type Boolean Unsigned Integer Logic points of one type can reference a logic point of a different type as long as the final return type is correct. Logic symbols A logic point is referenced by its symbol and number. Type Symbol Minimum Point Number Maximum Point Number Example BI 0 1000 BI16 Counter Input CI 0 1000 CI16 AI 0 1000 AI16 Binary Output BO 0 1000 BO16 Analogue Output AO 0 1000 AO16 Logic syntax Logic expressions are case insensitive. Spaces are required between operators and functions. There are no line delimiters and the expression must be evaluated as a single line. Custom functions are not supported i.e. only functions listed in this FAQ may be used. Boolean values can be written as True or False. Real and integral numbers can be used. Hex values can be written using the standard hex notation 0xFF12. Some functions may return Null when a value does not apply or has not yet been recorded. Nortech Management Ltd, United Kingdom Page 3 of 13

Arithmetic Operators Operator Description + Addition. Example: LastValue(CI0) + LastValue(CI1) - Subtraction. Example: LastValue(CI0) - LastValue(CI1) * Multiplication. Example: LastValue(CI0) * LastValue(CI1) / Division. Example: LastValue(CI0) / LastValue(CI1) % Modulo. Example: LastValue(CI0) % LastValue(CI1) ^ Power. Example: LastValue(AI0) ^ 2 Comparison Operators Operator Description = Equal to. Example: LastValue(CI0) = LastValue(CI1) <> Not equal to. Example: LastValue(CI0) <> LastValue(CI1) > Greater than. Example: LastValue(AI0) > LastValue(AI1) < Less than. Example: LastValue(AI0) < LastValue(AI1) >= Greater than or equal to. Example: LastValue(AI0) >= LastValue(AI1) <= Less than or equal to. Example: LastValue(AI0) <= LastValue(AI1) Logical Operators If both operands of an expression are boolean, then it is a logical operation. Operator And Or Xor Not Description Returns True if both its operands are True. Example: LastValue(BI0) And LastValue(BI1) Returns True if any of its operands are True. Example: LastValue(BI0) Or LastValue(BI1) Otherwise known as Exclusive Or. Returns True if and only if exactly one of its operands are True. Example: LastValue(BI0) Xor LastValue(BI1) Returns True if operand is False and vice-versa. Example: Not LastValue(BI0) Logical Not operator must always be surrounded in parenthesis where it follows a preceding logical Not operator. Example: False Or Not (Not True) Nortech Management Ltd, United Kingdom Page 4 of 13

Bitwise Operators Bitwise operations should only be performed on integers such as Counter Input values or numeric values that have been cast to an integer. Bitwise operations are useful where bit flags are encoded in an integer value. Operator Description And Performs logical And operation on each pair of corresponding bits by multiplying them. Result is 1 if both bits are 1, otherwise it is 0. Example: LastValue(CI0) And LastValue(CI1) will return 4 if first value is 5 and the second value is 6. 0101 (decimal 5) And 0110 (decimal 6) = 0100 (decimal 4) Or Performs logical Or operation on each pair of corresponding bits. Result is 1 if either bits are 1, otherwise it is 0. Example: LastValue(CI0) Or LastValue(CI1) will return 7 if first value is 5 and the second value is 6. 0101 (decimal 5) Or 0110 (decimal 6) = 0111 (decimal 7) Xor Otherwise known as Exclusive Or. Performs logical exclusive Or on each pair of corresponding bits. Result is 1 if only one bit is 1, otherwise it is 0. Example: LastValue(CI0) Xor LastValue(CI1) will return 3 if first value is 5 and the second value is 6. 0101 (decimal 5) Xor 0110 (decimal 6) = 0011 (decimal 3) Not Performs logical negation on each bit. Bits that are 0 become 1 and bits that are 1 become 0. Example: Not LastValue(CI0) for a Counter Input (32-bit Unsigned Integer) will return 4294967294 if value is 1. NOT 00000000000000000000000000000001 (decimal 1) = 11111111111111111111111111111110 (decimal 4294967294) Bitwise Not operator must always be surrounded in parenthesis where it follows another operator. For example: 1 - (Not(LastValue(CI0))) For further information, see https://en.wikipedia.org/wiki/bitwise_operation Nortech Management Ltd, United Kingdom Page 5 of 13

Bitwise Shift Operators Bitwise shift operators should only be used on integers such as Counter Input values or numeric values that have been cast to an integer. A binary shift operator shifts all of the bits by moving every bit a specified number of places and the vacant bit positions are filled in. Operator Description << Shifts its first operand left by the number of bits specified by its second operand. Example: LastValue(CI0) << 1 if counter input value is 1 then this will shift the counter input value one bit to the left and the empty position in the least significant bit (most-right bit) is filled with a zero, 1 << 1 = 2. 00000000000000000000000000000001 (decimal 1) = 00000000000000000000000000000010 (decimal 2) >> Shifts its first operand right by the number of bits specified by its second operand. Example: LastValue(CI0) >> 1 if counter input value is 2 then this will shift the counter input value one bit to the right and the empty position in the most significant bit (most-left bit) is filled with a zero, 2 >> 1 = 1. 00000000000000000000000000000010 (decimal 2) = 00000000000000000000000000000001 (decimal 1) For further information, see https://en.wikipedia.org/wiki/arithmetic_shift In Operator The In operator returns True if a value exists within an array. Example: LastValue(AI0) In (0, 100) If Last Value of AI0 is either 0 or 100 then return True, otherwise return False. Order of Operations When a logic expression contains multiple operators, the precedence of the operators controls the order in which they are evaluated. The list below summarises the operators in order of precedence from highest to lowest: 1. Power ^ 2. Multiplication, Division and Modulo * / % 3. Addition and Subtraction + - 4. Bit shift << >> 5. Comparison = <> < > >= <= 6. In 7. Logical and Bitwise Not 8. Logical and Bitwise And 9. Logical and Bitwise Or 10. Logical and Bitwise Xor Precedence can also be controlled by using parenthesis. For example, when writing an expression to calculate the average of 3 values, the expression 1 + 2 + 3 / 3 would produce an incorrect result of 4. This is due to the higher precedence for the division operator resulting in 3 / 3 being evaluated first. The correct way to write this expression would be (1 + 2 + 3) / 3 using the parenthesis to control the evaluation order and providing the correct result of 2. Nortech Management Ltd, United Kingdom Page 6 of 13

Where two operators have the same precedence, the operations are evaluated left to right, so 15 / 3 * 4 would be evaluated as (15 / 3) * 4. Examples of evaluation order: Expression Evaluation Order Result 25-4 * 5 25 - (4 * 5) 5 15 * 4-1 (15 * 4) - 1 59 15 % 5 + 3 (15 % 5) + 3 3 15 + 5 % 3 15 + (5 % 3) 17 15 / 3 * 4 (15 / 3) * 4 20 15 * 3 / 4 (15 * 3) / 4 11 1 + 5 ^ 2 * 2 1 + ((5 ^ 2) * 2) 51 1 ^ 5 + 2 * 2 (1 ^ 5) + (2 * 2) 5 1 + 5 * 2 ^ 2 1 + (5 * (2 ^ 2)) 21 True And Not False True And (Not False) True Not False And True (Not False) And True True 2 > 1 And Not False (2 > 1) And (Not False) True 1 + 1 < 3 + 2 (1 + 1) < (3 + 2) True 2 + 3 In (5) (2 + 3) In (5) True 3 In (6) and True (3 In (6)) And True False True And 3 In (6) True And (3 In (6)) False True Or False In (False) True Or (False In (False)) True 2 > 1 And 2 < 3 (2 > 1) And (2 < 3) True True And 2 < 1 And Not False (True And (2 < 1)) And (Not False) False Nortech Management Ltd, United Kingdom Page 7 of 13

Logic functions Basic functions Function If(condition, return this value when True, otherwise return this value) Cast(value, type) Date and Time functions Function Days(days) Hours(hours) Minutes(minutes) Seconds(seconds) Milliseconds(milliseconds) Data functions Description A conditional operator chooses a result based on a boolean condition. Example: If(LastValue(AI0) > 90, 100, LastValue(AI0)) If Last Value of AI0 is greater than 90 then return 100, else return the Last Value of AI0. Used to convert a value from one type to another. Example: Cast(LastValue(AI1), uint) This would cast a double to an unsigned integer. Target types supported by this function are: boolean byte sbyte short ushort int uint long ulong single double Description Number of days. Number of hours. Number of minutes. Number of seconds. Number of milliseconds. Function Description Supported Point Types IsAlarm(pointReference) Returns True if point is in an alarm state. Example: IsAlarm(BI0) IsReset(pointReference) Returns True if point is healthy. Example: IsReset(BI0) HasUpdated(pointReference, timespan) Returns True if a point has been updated with in the given time frame. Example: HasUpdated(BI0, Minutes(10)) will Counter Input return True if BI0 has been updated with in the last 10 minutes. HasChanged(pointReference, timespan) Returns True if a point value has changed with in the given time frame. Example: HasChanged(BI0, Minutes(10)) will return True if BI0 has changed with in the last 10 minutes. LastValue(pointReference) Nortech Management Ltd, United Kingdom Page 8 of 13 Returns the current value of an input point. Example: LastValue(AI0) Counter Input

Function Description Supported Point Types LastReadValue(pointReference) Returns the current value of an output point. Example: LastReadValue(BO0) Binary Output Analogue Output LastSetValue(pointReference) HasAlarmed(pointReference, timespan) HasReset(pointReference, timespan) Low(pointReference) LowLow(pointReference) High(pointReference) HighHigh(pointReference) MinValue(pointReference, timespan) MaxValue(pointReference, timespan) AvgValue(pointReference, timespan) Returns the last set value of an output point. Example: LastSetValue(BO0) Returns True if a point has changed to an alarm state within the given time frame. Example: HasAlarmed(BI0, Minutes(10)) will return True if BI0 has changed to an alarm state with in the last 10 minutes. Returns True if a point has changed to a reset state within the given time frame. Example: HasReset(BI0, Minutes(10)) will return True if BI0 has changed to a reset state with in the last 10 minutes. Low Threshold. Example: LastValue(AI0) < Low(AI0) will return True if the current value has crossed the L threshold. Low Low Threshold. Example: LastValue(AI0) < LowLow(AI0) will return True if the current value has crossed the LL threshold. High Threshold. Example: LastValue(AI0) > High(AI0) will return True if the current value has crossed the H threshold. High High Threshold. Example: LastValue(AI0) > HighHigh(AI0) will return True if the current value has crossed the HH threshold. Returns the smallest value of all analogue input readings reported within the given time frame. Example: MinValue(AI0, Days(7)) will return 1 if AI0 has reported readings of 1 and 10 with in the last 7 days. Returns the largest value of all analogue input readings reported within the given time frame. Example: MaxValue(AI0, Days(7)) will return 10 if AI0 has reported readings of 1 and 10 with in the last 7 days. Returns the average of all analogue input readings reported within the given time frame. Example: AvgValue(AI0, Days(7)) will return 5.5 if AI0 has reported readings of 1 and 10 with in the last 7 days. Binary Output Analogue Output Nortech Management Ltd, United Kingdom Page 9 of 13

Function Description Supported Point Types SumValue(pointReference, timespan) Returns the sum of all analogue input readings reported within the given time frame. Example: SumValue(AI0, Days(7)) will return 11 if AI0 has reported readings of 1 and 10 with in the last 7 days. HasValueAbove(pointReference, limit, timespan) Returns True if an analogue input reading reported within the given time frame is above the given limit. Example: HasValueAbove(AI0, 5.0, Days(7)) will return True if AI0 has reported readings of 1 and 10 with in the last 7 days. HasValueBelow(pointReference, limit, timespan) Mathematical functions Returns True if an analogue input reading reported within the given time frame is below the given limit. Example: HasValueBelow(AI0, 5.0, Days(7)) will return True if AI0 has reported readings of 1 and 10 with in the last 7 days. All double values in the examples shown below have been rounded to 3 decimal places. Function Description Supported Parameter Types Abs(value) Returns the absolute value of a given number. Example: Abs(LastValue(AI0)) will return 5 if AI0 value is -5. Integer Acos(d) The inverse of cosine. Returns the angle in radians of the given cosine. Convert radians to degrees by multiplying by 180/PI Example: Acos(LastValue(AI0)) will return 0 if AI0 value is 1. Asin(d) The inverse of sine. Returns an angle in radians of the given sine. Convert radians to degrees by multiplying by 180/PI. Example: Asin(LastValue(AI0)) will return 1.571 if AI0 value is 1. Atan(d) The inverse of tangent. Returns an angle in radians of the given tangent. Convert radians to degrees by multiplying by 180/PI Example: Atan(LastValue(AI0)) will return 0.785 if AI0 value is 1. Atan2(y, x) Returns an angle in radians of the given tangent. This tangent is a quotient of 2 numbers. Convert radians to degrees by multiplying by 180/PI Example: Atan2(LastValue(AI0), LastValue(AI1)) will return 1.373 if AI0 value is 5 and AI1 value is 1. Ceiling(d) Rounds the given value up to the nearest whole number. Example: Ceiling(LastValue(AI0)) returns 2 if value is 1.5 Cos(d) Returns the cosine of the given angle (in radians). Convert degrees to radians by dividing by 180/PI Example: Cos(LastValue(AI0)) will return -0.839 if AI0 value is 10. Nortech Management Ltd, United Kingdom Page 10 of 13

Function Description Supported Parameter Types Cosh(value) Returns the hyperbolic cosine of the given angle (in radians). Convert degrees to radians by dividing by 180/PI Example: Cosh(LastValue(AI0)) will return 1.543 if AI0 value is 1. Exp(d) Computes values of the exponential function. Returns 2.71828 raised to the given power. Example: Exp(LastValue(CI0)) returns 7.389 if value is 2. Floor(d) Rounds the given value down to the nearest whole number. Example: Floor(LastValue(AI0)) returns 1 if value is 1.5 IEEERemainder(x, y) Returns the remainder of x divided by y. Example: IEEERemainder(LastValue(CI0), 2) returns 1 if first value is 5. Log(d) Returns the logarithm of the given value. Example: Log(LastValue(CI0)) returns 0.693 if value is 2. Log10(d) Returns the base 10 logarithm of the given value. Example: Log10(LastValue(CI0)) returns 0.301 if value is 2. Max(val1, val2) Returns the largest value of the 2 given values. Example: Max(LastValue(AI0), LastValue(AI1)) returns 5 if first value is 1 and second value is 5. Min(val1, val2) Returns the smallest value of the 2 given values. Example: Min(LastValue(AI0), LastValue(AI1)) returns 1 if first value is 1 and second value is 5. Pow(x, y) Returns x raised to the power of y. Example: Pow(LastValue(AI0), 2) returns 100 if value is 10. Round(a) Rounds a given value to the nearest whole number. Example: Round(LastValue(AI0)) returns 2 if value is 1.5 Sign(value) Returns -1 if the given value is negative, 1 if positive and 0 if value is zero. Example: Sign(LastValue(AI0)) returns 1 if value is 20 Sin(a) Returns the sine of the given angle (in radians). Convert degrees to radians by dividing by 180/PI Example: Sin(LastValue(AI0)) will return -0.544 if AI0 value is 10. Sinh(value) Returns the hyperbolic sine of the given angle (in radians). Convert degrees to radians by dividing by 180/PI Example: Sinh(LastValue(AI0)) will return 1.175 if AI0 value is 1. Sqrt(d) Returns the square root of the given value. Example: Sqrt(LastValue(AI0)) returns 12 if value is 144. Tan(a) Returns the tangent of the given angle (in radians). Convert degrees to radians by dividing by 180/PI Example: Tan(LastValue(AI0)) will return 0.648 if AI0 value is 10. Tanh(value) Returns the hyperbolic tangent of the given angle (in radians). Convert degrees to radians by dividing by 180/PI Example: Tanh(LastValue(AI0)) will return 0.762 if AI0 value is 1. Integer Integer Integer Nortech Management Ltd, United Kingdom Page 11 of 13

Array functions Function Description Supported Parameter Types Array(value1, value2, ) Count(values) Round(values, digits) First(values) Last(values) Average(values) Min(values) Max(values) Between(values, lower, upper) Creates an array from the passed values. Example: Array(LastValue(AI0), LastValue(AI1)) Returns the number of items in the given array. Example: Count(Array(LastValue(AI0), LastValue(AI1))) will return 2. Rounds all values in the given array to the nearest decimal place. Number of decimal places is represented by digits. Example: Round(Array(LastValue(AI0), LastValue(AI1)), 2) will round each value in the array to 2 decimal places. Returns the first item in the given array. Example: First(Array(LastValue(AI0), LastValue(AI1))) will return the value for AI0. Returns the last item in the given array. Example: Last(Array(LastValue(AI0), LastValue(AI1))) will return the value for AI1. Returns the average of all values in the given array. Example: Average(Array(LastValue(AI0), LastValue(AI1))) will return 3 if AI0 value is 1 and AI1 value is 5. Returns the smallest value in the given array. Example: Min(Array(LastValue(AI0), LastValue(AI1))) will return 1 if AI0 value is 1 and AI1 value is 5. Returns the largest value in the given array. Example: Max(Array(LastValue(AI0), LastValue(AI1))) will return 5 if AI0 value is 1 and AI1 value is 5. Returns all values between the lower and upper values. Example: Between(Array(LastValue(AI0), LastValue(AI1)), 4.0, 20.0) will return one value of 4 if AI0 value is 1 and AI1 value is 4. Boolean Integer (all parameters must be of the same type) Array Array of or Integer, Integer Array Array Array of or Integer Array of or Integer Array of or Integer Array Lower/Upper must be of same type as Array. Outside(values, lower, upper) Returns all values outside of the lower and upper values. Example: Outside(Array(LastValue(AI0), LastValue(AI1)), 4.0, 20.0) will return one value of 1 if AI0 value is 1 and AI1 value is 4. Array Lower/Upper must be of same type as Array. Nortech Management Ltd, United Kingdom Page 12 of 13

Examples Input aggregation Average 3 phase voltage: (LastValue(AI0) + LastValue(AI1) + LastValue(AI2)) / 3 HV voltage using tapping ratio of 4.5: (LastValue(AI0) + LastValue(AI1) + LastValue(AI2)) / 3 * 4.5 Alarm if analogue over threshold Alarm if analogue over HH threshold: LastValue(AI0) > HighHigh(AI0) Combinational binary logic (e.g. Any Alarm point) IsAlarm (BI0) Or IsAlarm (BI1) Or IsAlarm(BI2) Bitwise operator on analogue value (truncating to unsigned integer value) Cast(LastValue(AI0), uint) And 2 Nortech Management Ltd, United Kingdom Page 13 of 13