Data Source

Both equipment and users have knowledge about the factory, it can be either a counter value, a machine alarm or a current thermostat setting.

In PackOS we call these parameters ‘signals’, they are constantly being observed and processed to determine what’s currently happening on the shop-floor.

Our edge component - LogiX Gate - is a listener designed to handle many communication protocols in parallel - OPC, HTTP, SQL, listen for value changes and send them to our cloud-based processing.
LogiX Gate will buffer all messages if connection is not available, and send them as soon as it’s back.

It’s important to keep in mind that a single machine should not be powered by multiple LogiX Gates as it might cause issues with clock synchronisation. More on that later.

LogiX Gate sends messages in batches of configurable size, below you can see an example message consisting of 3 signal value changes:

[
    {
        "NodeId": "s=Filler_Counter",
        "ApplicationUri": "OPC1",
        "Value": {
            "Value": 100,
            "SourceTimestamp": "2021-04-30T00:03:20.917Z"
        }
    },
    {
        "NodeId": "s=Filler_Counter",
        "ApplicationUri": "OPC1",
        "Value": {
            "Value": 110,
            "SourceTimestamp": "2021-04-30T00:03:31.026Z"
        }
    },
    {
        "NodeId": "s=Capper_Alarm",
        "ApplicationUri": "OPC1",
        "Value": {
            "Value": 1,
            "SourceTimestamp": "2021-04-30T00:03:31.026Z"
        }
    },
]
note

Ability to input manual data - parameters, photos etc. using a mobile app is under development

Ability to input manual data - parameters, photos etc. using a mobile app is under development

Before the main processing, each signal can be transformed and/or augmented using PackOS pre-processing functions: Pre-Processing Functions ✔️

Machine model

Regardless of the technical details of gathering data from the factory, a machine is modelled in PackOS as an asset with pre-defined set of:

We are developing a new model of an asset, describing its internal structure (parts) and models for processes, health, behaviour and predictive maintenance
Read More: The Story Behind the Self-Learning Factory Concept

Signals

Each signal is identified by its Name. It’s an identifier which needs to be unique in the context of a machine, important in rule execution (see below). It should not contain any spaces or special characters, and cannot be changed after the signal is created.

To display a more user-friendly name, use signal Description

Clocks

Each machine is ‘powered’ by multiple signals, sometimes from multiple data sources (e.g. 2 different OPC servers). When LogiX Gates reads values from these sources, it sorts them and assigns each message a current timestamp based on the local clock. This makes sure that messages sent by a single LogiX Gate are always in-order, regardless of the clocks of the sources.

Each machine tracks its own clock. This clock does not tick continuously like a usual clock, but rather it is dependent on the latest timestamp of the received messages. Time-dependent computation states like time rules or short performance are applied instantly for the whole period between the last and the current clock.
(e.g. when there are two messages 10:00:00 → 10:00:10, the rules are evaluated instantly 10 times for all timestamps in-between: 10:00:00, 10:00:01 …. 10:00:10)

This creates 2 types of corrupted messages, usually incorrectly coming from a second LogiX Gate instance:

To resolve issues with time:

State Rules

State rules control a current state of a machine, there are two possible formats:

Both formats can be used simultaneously for different rules on a single machine.

To remove problem you need to remove all rules assigned to it.

Simple conditions

If you work with simple value comparisons, you can just use the UI for the list of conditions, and don’t need to dig deeper into this topic

The ‘advanced editor' uses the following syntax:

(expression1) && (expression2) || (expression3)

Each expression can consist of exactly one Name, Value and Timestamp comparison

(Name Equals AlarmOne && Value Equals 1) && (Name Equals AlarmTwo && Value Equals 0)

To understand it, imagine the following table of all signals, with their current values and timestamps of last updates:

Name

Value

Timestamp

AlarmOne

1

3rd Feb, 10:00:00

AlarmTwo

2

3rd Feb, 9:50:00

The expression is true, if there is a row in this table which corresponds to the expression conditions.

E.g. this expression is true:

(Name Equals AlarmOne && Value Equals 1)

Because there is a row where Name = 'AlarmOne' and at the same time Value = '1'.

However this rule:

(Name Equals AlarmTwo && Value Equals 0)

Is not true, the current value of AlarmTwo is 2.

Sometimes, you need to use a dynamic value for comparison, injected when the rule is executed:

Supported value comparisons:

The following expressions will attempt to convert value to a decimal before comparing, if

To combine expressions you can use:

Note that:

All of the points mentioned above, and much more is supported by the advanced format:

Advanced format

Warning: You’re entering an advanced section for engineers and developers. Topics described below are not a needed for most PackOS users. They require some programming skills, but can help you better tune PackOS to your needs

It allows you to write arbitrary C# expressions returning true or false.
Before writing a rule, you need to decide if the rule is time-dependent (which will allow you to use Now) and check for example if last signal timestamp exceeded some duration.

An example rule looks as follows:

Signals.GetCurrentValue<bool>("AlarmOne") && !Signals.GetCurrentValue<bool>("AlarmTwo")

The following variables are available: