4. Mixing System Solution

Cogent's development team decided the most effective means of delivering the required functionality would be to separate the user interface from the control system. It was agreed that the InTouch screens would remain as the user interface running on a Windows computer. A computer running the QNX operating system would be installed to handle all control and data handling requirements. The QNX computer would work in conjunction with the Windows computer and the two operating systems would pass information back and forth using a dedicated fibre optic network link. The Windows computer would now only have to deal with the operator interaction and the display of process data. The QNX computer would handle all control decisions, all communication with the PLC and all interactions with other computers on the network that provide scheduling and recipe information.

The connection between the QNX and Windows computers was established using Cogent's Cascade Connect software program as shown in the diagram below.

Figure 2. Cascade Connect link between QNX and Windows.

Cascade Connect provides the real-time data link between programs in Microsoft Windows and programs running on separate QNX computer. Cascade Connect uses a standard network connection and native messaging protocols on both computers so there is no overhead or strain on the system due to any special tasks that run in the background. On the Windows computer the Windows Client program (in this case InTouch) sends and receives messages using the Windows DDE messaging protocol. On the QNX computer the QNX Client (a control program or data manager) communicates with the Cascade Connect program using the QNX send/receive/reply messaging protocol. Between the two computers, Cascade Connect passes messages using the TCP/IP protocol. This means that Cascade Connect can be used with any Windows Client program without the need for any special programming.

Figure 3. Example of the InTouch screens used by operators in the Chocolate Production Department.

The use of TCP/IP means that the two computers can be connected over a standard network link or over the Internet. In QNX the Cascade Connect program is simply another named task that other programs communicate with using normal QNX messaging.

The effects of separating the control and user interface were significant. The Windows computer now had to only run InTouch and a small Cascade Connect program. This significantly reduced the load on the DOS system and allowed Windows to respond more quickly to the operator's requests. The QNX computer was now responsible for communicating with the Siemens PLC and it was decided to implement the same serial line device driver as had been developed for the Windows computer (in order to try to keep development costs down). One of the major differences between the two operating systems was that we were able to run the Siemens driver at a higher priority than other QNX system tasks. The ability to protect the Siemens driver prevented other tasks from delaying any communication between the QNX computer and the PLC. This prevented the PLC from timing out (which had been the problem with Windows) and so prevented the break in communications that caused delays and more importantly, loss of process data.

Figure 4. Mixing Control System Architecture.

To solve the problem of interleaving the two mixers, we used the Gamma development environment and the Cascade DataHub; both Cogent software products specially designed for QNX process control applications. Gamma and the Cascade DataHub provided the open architecture needed to fully implement the desired control strategy. An interleaved control program with timely operator interruptions (for the manual addition of small quantity ingredients) was developed and we used the DOS control code as a guideline. One of the benefits offered by Gamma was the ability to effectively provide two operating 'threads' so that neither mixer was waiting longer than necessary for the other to finish a stage in the control procedure.

The QNX control system runs unassisted and isolated from the Windows computer, starting the next batch automatically from daily production schedules. Production schedules are copied to the control computer from another QNX computer on the network (this one located in one of the test labs). Operator intervention (through the InTouch screens) is only needed to acknowledge the addition of manual ingredients and to release the first mix in a batch from the mixers to the conveyor belt for the refiners. The other three mixes in the batch are released automatically by the control program.

To facilitate this automatic control, each mixer contains a load cell that is used to determine the weight of ingredient added to the mixer. Free-fall weights (the amounts that enter the mixer after the feed valves have been closed) were determined experimentally and are used by the control program and PLC to allow close control of ingredient additions in order to reduce variability between mixes. These free fall weights are actually entered by the supervisors and transmitted to the PLC by the control program because the weight varies with climatic conditions.

Figure 5. Network topology.

Networking speed and stability are crucial to the operation of the control system. The use of QNX and Cogent software for all control programs allowed us to implement a high degree of fault tolerance into the system. This effectively isolated the control programs from the harmful effects of having the Windows computers crashing from time to time.

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.