Automate actions and streamline decision-making with OCS360’s flexible Rule Chains. In this session, we’ll explore how to build and configure rules that respond to your machine data in real time. You’ll see how to set conditions, trigger alerts, execute actions, and even link multiple rules together to create powerful, automated workflows. Whether you’re looking to improve efficiency, enhance safety, or reduce downtime, Rule Chains in OCS360 give you the control to make it happen—automatically.




0:01

apologies on the delay, some technical difficulties but we’re there now.

0:06

So today’s webinar is on rule chains in OCS 360.

0:10

The presentation is roughly about 15 minutes but if you’ve any questions feel free to pop them in at any point and we can get them at the end. Hello and welcome to today’s webinar.

0:21

Today we will look at rule chains in OCS 360. Let’s look at our agenda for today.

0:29

We’re going start with a quick review of OCS360 and then we are going to get into today’s topic and answer some questions such as what are rule chains? What are common uses of rule chain?

0:44

And there will be demonstrations throughout and we will finish with a Q &A session.

0:49

Here is a quick review of OCS360 Cloud Service.

0:54

It is a new cloud service from Horner making it’s as easy as possible to push data from a PLC-like device, in this case the Horner OCS to the cloud using a special version of MQTT that is built into Prime and Canvas controllers and there are no extra licensing required.

1:16

With OCS 360 you get data recording up to 5 years, dashboarding and alarm annouciation and notification.

1:25

So, what is rule chain?

1:27

A rule chain is a logic that is written in a node-based programming language that is executed by a rule engine in the OCS360 application.

1:38

If we go to the rule chain section OCS360, you can see the root rule chain which is included with OCS360 that we have got here on the screen.

1:50

There are a lot of advanced things you can with real chains, for instance, you can manipulate incoming messages that come into OCS 360.

2:00

You can create new variables based on existing variables, so if you have a piece of pressure data, for instance, that you are ascending up to the cloud, you do not have to push both PSI and barriers up to the cloud, you can just push one of them and then do a conversation using real chains right within OCS360 itself, so that is a common type of use.

2:25

You can also do some complex rules or create some rules for creating an alarm that is another thing you can do.

2:33

You can create an automatic alarm response by OCS360 when an alarm occurs if you want to do that as well.

2:41

You can also automatically control a variable in reaction to a specific condition as well variables are being pushed to OCS 360 you could have a piece of rule chain logic that detects if a condition in that variable that is being pushed to the cloud and then reacts to that by writing a variable value back down to the controller automatically without having to have a human intervention so there is a lot you can do with rule chains.

3:11

Rule chains are a node basic logic language That’s so the building blocks of the rule chain are nodes and they are a few dozen different nodes Available for you to use in your rule chain logic and they are divided into five different categories There is a filter category. What is that used for?

3:34

It can be used for message filtering alarm filtering Even dual fencing. What are the enrichment nodes for?

3:42

you can manipulate device attributes customer attributes you can trigger an email you can rename or delete variables why would you want to delete a variable well after you push a variable into ocs360 you want to monitor that variable but then you want to delete it before it gets recorded maybe you do not want it to be in the recording for the five years of maximum recording so that If you have got an action category, you can use those actions to clear alarms, assign alarms, create alarms, control devices.

4:22

These are all things that would occur without human intervention.

4:26

You would set this up for real chain ahead of time and then that action would take place for you prescribed for ramen of the real chain.

4:35

And then there is also flow category of nodes which allow you to link a customer real chain to the default rule chain for instance.

4:45

For today’s example we are going to effectively create a new variable based on another variable that is being pushed to OCS360.

4:55

This is what we are going to do as our example of using a rule chain.

5:01

So that is happening here that is our example device we have used as an OCS that is pushing data to the cloud, it is a prime unit and we have named it in OCS360 as EpoxyMatic.

5:15

The EpoxyMatic has been pushing a variable called temperature to OCS360 for weeks now and that is expressed in degrees C.

5:26

That is the format that it has been reported in, created a real chain piece of logic that takes a variable coming in temperature and it converts it to degrees F instead of C and source in a different variable called temperature F and that variable is not one that is being pushed to the cloud directly.

5:47

It is being created by the chain rule and it does not count towards our number of variables per minute.

5:54

Now to create this new variable that has been a converted version of another variable we are going to use the function node which we can find in the action nodes category.

6:07

So that is what we are going to use that for and on the screen all you see still is a root node chained without any changes made.

6:18

When we click on the math function node automatically the dialog box pulls up and then we can start configuring it.

6:26

We need to assign a name to this node.

6:28

We call this one on the screen C to F because that is what it is doing.

6:34

It is a good idea to turn on the debug mode switch in the upper right hand corner there.

6:40

That way we can see this particular variable in action.

6:44

When we go take a look at the device, we can look at the different variables being pushed by that device.

6:51

This won’t be listed among them.

6:53

We will not see only temperature, but we will see this new variable that we are creating.

6:58

and then in the case of the math function block we need to select what function we are going to be using and in our case we are doing a custom function which allows us to type a complete expression in.

7:13

The other option are things like add, subtract so if we were just doing a simple add only we would not have to use the custom function. Then we need to configure the arguments.

7:25

What are the arguments in this case?

7:28

First of all what is the variable or key that we are having in the expression?

7:33

It represents the variable x in this math function node and that particular key we are looking for is our temperature variable that is being pushed from the epoxymatic.

7:46

We fill in a default value which we will put in at 0 and then we need to do at the bottom under the expression a label that we placed on the screen you can see the particular equation that we are going to be executing x times 1.8 plus 32 now we are almost done the last couple of things we have to configure in the math function node is we need to configure the results what is the result now the type is just a message and the key is the name of the new variable that we are creating and the original variable that we use as our basic was called temperature.

8:32

We have decided to name the resulting new variable that we have created temperature F and then we need to specify how many digits after the floating point.

8:43

We want this value to be limited to and so you can also fill in the description at the bottom if would like. What we have done is configure the node and now we need to put it in the rule chain.

8:56

We need to position the node in the post-celementary float area.

9:01

So if you take a look at the before section of our slide here.

9:05

After post-celementary we go directly to the save time series. That is where everything is saved.

9:12

So what we are going to do before the occurs is we are going to insert this node it is a math function type and it has been named C to F by us that is going to be inserted in the post-segment true area before we save time series and then that success bubble you see on the arrow after the math function that is just indicating that it should occur after successful implementation of a math function so this is what things look like on the rule chain.

9:47

For our demonstration we are going to start by logging into OCS360, we are going to click on the rule chains.

9:56

Here we have our root rule chain that is being shown, let’s click on it and here is what it looks like.

10:04

Now our 1 is not the default because we have added this math function so we could create a new variable.

10:12

We inserted a node that we named c to f and what it is doing is taking one of the existing variables or keys that are being pushed to the OCS 360 from our OCS.

10:25

It is called temperature.

10:27

This is the name of that variable and create a new variable called temperature f and we that by adding this math function in the flow between post-celementary and save time series.

10:41

We can tell that it is working by going to the device list, going to our device and clicking on it and then looking at the latest sedimentary and seeing not only temperature which is being pushed directly by the OCS but temperature F which is being created by the real chain modification directly in the OCS360 and this variable here temperature F.

11:07

Now let’s go back to the rule chain area and let’s make another change.

11:11

So we are going to go back to the root rule chain and what we are going to do is something similar.

11:18

We are going to insert another math function this time going to take another variable that has been pushed by the OCS to the OCS360 called pressure and that is in PSI and we are going to create a new variable in bars. So that is the plan for this modification.

11:37

It is going to start out the same way. The last one did. We need to find the action node for math.

11:44

We go to the action nodes and we select the math function. We drag it out into our workspace here.

11:54

We are going to call this the psi to bear and then the source is the data coming in from a message but instead of that message being the temperature variable it is going to be our pressure variable and that temperature was just the default that they have in here let’s type in our variable name that is our key which is which is pressure we are going to assign the default value of zero and then we are going to type in our expression.

12:24

Our expression is going to be to convert from psi to bear. Our expression is going to be x times 0.0689475729.

12:39

We are taking our pressure which is x and multiplying by this constant and the result is going to be in a new variable that we are going to call pressure bear let’s do five digits then let’s hit add so we have added this node here now we just have to put in the proper place in the rule chain we’re going to drag it and what we want to do is we need to put it in a series so with this other math function we are going to move this from there to here and we are going to make more space and we are going connect from here to here but only on success and hit add so now between our post elementary flow we have our math function creating a new variable for degrees f another math function create a new variable for psi to bear and it is right in line with the time series let’s go back to this node and we will hit the edit button and we want to allow debug mode, that way we can look at live values and it will show up in our list of telemetry of the latest telemetry.

13:55

So we are going to hit save here and close and we need to hit save here, those changes have been applied, now let’s just check our work by going back to the device section, Selecting our device that has been pushed out of the pressure variables, going into our latest elementary and here it is.

14:16

Not only do we have pressure, we have also got pressure bearer.

14:20

Now you probably are pushing your data out once per minute.

14:24

So be aware, after you make this change, you may have to wait for up to a minute if you are pushing your data out once per minute for this to show up here.

14:35

because it needs a new value of pressure before it can work on this.

14:40

That concludes our webinar for today.

14:43

Thank you so much for listening and the Q &A session will begin shortly.

15:12

all under the webinar section of our website if you’d like to re-watch any of them.

15:17

I don’t see any questions in on that so I think we can leave it there.

15:20

Thank you all for joining us and we’ll see you next time