Communication
Production process control systems consist of the following four levels of components:

Level 1: Logic controller and drives
Level 1 consists of drives such as electric motors, pneumatic and hydraulic systems and the control devices and power needed to use these. Level 1 manages all measurement data e.g. from limits, pulse counters and other scanners. Level 2 is connected to the control devices of level 1 through various interfaces such as serial port communications, Web Services or online devices (IoT).
Level 2: Scada (Supervisory Control And Data Acquisition) system and logic controller
Level 2 controls the drives and reads the measuring data from scanners in Level 1. Devices are turned on or off based on the measuring data. For example, if a photo cell on a loader detects a log, the electric motor can be turned on until the photo cell no longer detects the log. The problem with Levels 1 and 2 is that the measuring data are sensitive to different environmental factors. For example, a chip or some ice on the photo cell can disrupt the entire control system. Good suppliers and the bad ones can be told apart by the quality of their planning and the fault tolerance of their devices. Quality is not determined by the amount of steel but by resilience to different environmental factors.
Level 3: MES (Manufacturing Execution System)
Level 2 communicates with Level 3 through different, slightly more advanced, interfaces such as serial port communications, the IoT and Internet protocols. There are not any MES suppliers in the sawmill industry. Instead, MES functions are usually integrated into ERP and SCADA systems. This is partly due to the small size of the market but also because, due to the organic nature of wood, it would not be sensible to create a clear system interface to manage production and ERP functions. Production is fully dependent on the cost and sales data produced by the ERP system while an MES system alone integrated into an ERP system will inevitably lead to suboptimisation and a poor financial outcome.
Level 4: ERP
The ERP system produces sales and storage management data and all cost data. Advanced ERP systems also include an MES module or are fully integrated into an MES system. MES modules or interfaces are used to gather the required production data. The MES layer usually communicates with automation subsystems through different file interfaces.
An example of communication between the systems is the optimal sawing plan:
1) The optimal sawing plan is created by the ERP system.
2) The optimal log class/sawing pattern matrix is transferred from the ERP system to production automation, for example to log rotation.
3) Sorting automation produces a certain grading distribution that is then transferred through the above-mentioned application layers to the MES/ERP system.
4) The ERP system monitors the grading distribution comparing all these data with sawing pattern profitability data. If the grade distribution produced is different in a way that is statistically significant, calculations are adjusted and new settings are sent to the software that manages the rotation.
Stages 1–4 are run without interruption, which will provide the optimal values of the desired variables. The variables could be, for example, production capacity, utilisation ratio or yield value.
Subsystems
IT interfaces follow the ISO (International Standardization Organisation) OSI model (Open Systems Interconnection Reference Model). Interfaces are created in the application layer using different technologies.
Open Systems Interconnection model (OSI model).
Application programming interfaces are created using, for example, Web Services/ SOAP architecture or IoT technologies.
Using these common standards, it is possible to create a bi-directional interface so that data from a scanner is transferred to a logic controller and from there to control automation software and through the software to the ERP/MES system.
The ERP/MES system performs calculations, for example for the sawing pattern, and the result is transferred via the interfaces and through the different application layers so that the new control data is received by the automation system. At best, this can happen in milliseconds but usually, due to real-life limitations, the ERP system recipes are produced for the software controlling the control automation system.
The most advanced interfaces are created using the event-driven Web API or Web Services interfaces. The problem with Windows interfaces or file interfaces, such as the CSV applications, is their lock files and how a nearly real-time file-based interface can be implemented so that it will recover from all possible fault situations.
Interfaces
FTP (File Transfer Protocol):
- The worst possible way of creating an interface.
- The aim is often a real-time application even though the technology is purely based on batch running.
- Delays are at least minutes-long, often over ten minutes.
Serial port communications:
- A unidirectional interface through which the bitstream produced by the serial port is heard.
- The unidirectional solution creates serious limitations for the interface.
Direct logical links:
- Logic is controlled directly through various supplier DLL libraries.
- The problem is the low-level solution that causes limitations and problems for implementation because it would involve controlling single registers.
Batch processing and realtime applications:
- The simplest way to create interfaces is that, for example, files are read using batch running. The problem with batch running is the delays in reading, which means that control parameters are often late.
- Real-time implementation usually meets business requirements but the implementation is always fairly complex. In particular, error management requires extra work that will always lead at least to doubling or tripling the cost.
Data reading, controlling:
- Reading data from different inputs is a very straightforward process.
- A selected file, input or bitstream from a serial port is read and the necessary steps are run using inputs.
- If the input requires calculations and a realtime or near real-time response with control parameters, the only feasible solution to use is Web API or Web Services.