Example: Calculated inputs for monitoring production lines

This guide assumes, that you know about calculated inputs and stop codes, if you don't you can read more about them here: calculated inputs , stop codes

Creating a state machine tag for OEE

You can use calculated input as state machine tag for a OEE unit. This calculated input will provide state readings, which will tell if the OEE unit is running or stop and why it is stopped.

There several ways this can be achieved. We will show the one, that we think is the most common use. Say you have several tags that goes high when an error occur like these:

   

Tag name data type Description
TemperatureTooHigh bit The temperature is too high
MissingMaterial bit There is no material to process
EmergencyStop bit Machine stopped because an accident has occurred

 

The tag setting for one of these tags, could look like this:

With these tags, you can make an expression in a calculated input, which will create the states, that can be used. The expression is made by multiplying the first tag with 1, the second tag with 2, the third tag with 4 and so on(The number is doubled for each tag added):

1*tag1 + 2*tag2 + 4*tag3 + 8*tag4 + 16*tag5 + 32*tag6 ...

With our tags:
1*TemperatureTooHigh + 2*MissingMaterial + 4*EmergencyStop

The calculated input setting for this expression could look like this(Make sure at OEE tag checked):

Now you have a calculated input, that can be used as a state tag for a OEE unit. In our example this tag has the following states:

No errors, machine is running:
1*0+ 2*0+ 4*0 = 0

TemperatureTooHigh goes high:
1*1+ 2*0+ 4*0 = 1

MissingMaterial goes high:
1*0+ 2*1+ 4*0 = 2

EmergencyStop goes high:
1*0+ 2*0+ 4*1 = 4

They can also be combined.

TemperatureTooHigh and MissingMaterial goes high:
1*1+ 2*1+ 4*0 = 3

TemperatureTooHigh and EmergencyStop goes high:
1*1+ 2*0+ 4*1 = 5

MissingMaterial and EmergencyStop goes high:
1*0+ 2*1+ 4*1 = 6

Using the state machine tag in OEE

Now that you have the state machine tag, you can use it in a stop code data source, by selecting it as the Diap tag(If OEE tag is unchecked in the calculated input setting, then the tag won't be shown here) and since no errors is 0 in our example, it will be set as the run code:

Next you bind the errors to stop codes for the unit:

Now you have create a state machine tag, bind errors to stop codes, you just need to turn on the data source:

With this you now a fully functional state machine on a OEE unit, which can provide a timeline of the states for the OEE unit: