Skip to content

Introduction to Status Rules

Status Rules are used to derive the status of an asset from other time series variables. For example, this could be a series of error codes, process measurements or signals from other machines in the line. It is a flexible way to implement custom logic to determine the runtime or downtime state and reason code. Whenever any of the time series input variables in the rule receive new values, then the status rule is evaluated and a new state is stored, at that timestamp, for your OEE asset. There is no minimum interval of state change, instead, the state can change as fast as the input variables.

To apply a Status Rule to an asset, you first need to create a Status Rule Template. A template is a definition of a rule that includes the abstract variables and logic. This is then applied to an asset by mapping each of the variables in the template to a specific time series variable. This pattern separates the rule logic from the rule instance to allow the same logic to be reused across multiple assets.

Config-statusruletemplate-configurationmenu

① Create and configure Status Rule Templates
② Apply Status Rule Templates to assets to create the Rule instances

Insights Hub OEE provides a graphical user interface in the configuration section to build Status Rule Templates without any code writing. The Status Rule Templates are then applied in the specific Asset Configuration, where there is a stepper wizard to map the rule variables to time series variables.

Note that the Status Rules output status codes. These codes still need to be mapped to the reason text using the status mapping as usual.

Configuring Status Rule Templates

In the Status Rule Template configuration page, you can manage the list of previously created templates and choose to add a new template.

Config-statusruletemplate-list

Adding Variables to a Rule Template

To configure a new template, you must give it a name and a default state. The default state will be used if none of the conditions in the rule editor evaluates to true.

In the "Variables" tab, define the names of the variables that will be used in this template. Also, select a data type of BOOLEAN, NUMBER or STRING. Optionally, you can specify a unit and give a description. You can create up to a maximum of 20 variables per template. Variables are then used in the "Rule Editor" tab.

Config-statusruletemplate-variables

① Navigates to the "Configuration" tab
② Define a name for the new "Status Rule Template"
③ Specify a default state
④ Switch tabs from configuring variables to the rule editor
⑤ Add a variable

Note that, if a variable is already used in the rule editor, then it cannot be deleted from the variable list, as shown in the example above with "Stirrer Speed".

Adding Conditions to a Rule Template

Switching to the "Rule Editor" tab, initially the rule template consists of a single, empty "Condition". You can build the rule template by adding logic to these conditions. You can add up to 100 conditions, each one being mapped to a different state. If the condition evaluates to true, then the state is set to the one specified in the "State" box. Also, the conditions are evaluated in a priority order, so that the top of the list is evaluated first, then the second and so on. If no condition evaluates to true, then the default state is used. The priority order of the conditions can however, be changed by using the arrows to move it up or down the list.

The image below shows a rule template with two conditions. The rule engine evaluates the top condition first. If this is true, then the status variable is set to "SafetyBoxOpen". If it is false, then the second condition is evaluated. If this is true then the status is set to "200". If not, then the default state of "100" is used.

Config-statusruletemplate-conditions

① A complete condition
② The resulting formula used to evaluate the condition
③ Moves this condition up or down the priority order
④ Input the state to which this condition is mapped
⑤ Add a new condition to the list
⑥ Buttons to either delete or hide the condition

Each condition is built from a series of Boolean logical expressions. There can be several logical expressions within the condition that you can combine using Boolean AND/OR operators. The resulting formula is displayed at the top, providing an easy way to read the version of your logic that you can check while entering the expressions.

Configuring Expressions

For each expresion, you select one of the variables that you defined on the "Variables" tab. Then, the available comparison operators depend on the type of variable. For example, a BOOLEAN can be equal or not equal to true or false; a NUMBER can be equal, not equal, greater than or less than the entered numeric value; whereas a STRING can only be equal to the entered string value. See the example below for a NUMBER variable.

Config-statusruletemplate-expressionlogic

① Select a variable
② Select a comparison operator
③ Enter a comparison value

There are options to add further expressions to the Condition depending on the structure that you need for your formula. You can add an expression at the same level of the existing one by clicking "Add expression". Add a new group of expressions so that you add a logical "level" above or you can convert an expression to a group which equates to adding an expression below. When you have more than one expression, then you combine them using an AND/OR Boolean operator. You can easily change between the two using the toggle button, as shown below.

Config-statusruletemplate-expression

① Change the Boolean AND/OR operator with this toggle button.
② Add a new group of expressions
③ Add an expression at the same level
④ Convert this expression to a group and add an expression at the level below

The following examples are all built starting from the above condition, and will explain the different ways of adding expressions. The first example results from selecting "Add expression". In this case, a new expression including the "Flow Temperature Variable" has been added at the same "level". Now, there are three expressions within the same parenthesis in the formula. Note that, as we are not adding a new parenthesis, all the expressions must use the same Boolean AND/OR operator.

Config-statusruletemplate-addexpression

In the second example, we have selected "Convert to group" next to the "Current" variable. The formula shows a new parenthesis including the "Current" and now the "Flow Temperature" is configured at this "inner level". As we now have a new parenthesis, you can choose to combine the expressions with a different AND/OR operator.

Config-statusruletemplate-convertexpression

In the third example, we have selected "Add group". Again we have a new parenthesis, but now the "Flow Temperature" variable is configured at the "outer level" and "Stirrer Speed" and "Current" are evaluated in parenthesis at the "inner level".

Config-statusruletemplate-addgroup

The easiest way to understand the different ways of adding the expressions is to check the resulting formula. Using these different methods, you can arrive at any combination of logic that you need for the formula without writing any code. Below is an example with three "levels" of expressions.

Config-statusruletemplate-complexcondition

You can configure up to 100 conditions in this way to support quite complex rules for mapping time series variables to OEE status. When the Rule Template is fully configured, you can create one or more rule instances from it, by selecting it in the Asset Configuration.


Last update: November 20, 2025