Monday, November 3, 2008

Replacing a Programmable Logic Controller (PLC) with LabVIEW and FieldPoint for Composting Plant Automation

Introduction
Our project involved automating a large rail crane, inside a large hall, for composting mushroom substrate. The crane has to operate overnight without operators or human supervision, so reliability of the system is of prime concern. System design must also be of maximum user friendliness and adaptability. The length of the hall is 80 m, the width 12 m, and the depth 5 m. The crane, which has a lifting capacity of 3 tons, has four axes of movement (horizontal along and across, vertical up/down, and opening/closing of the fork).
The raw materials are delivered at one end of the hall, then mixed and arranged into heaps along the wide side of the hall. The crane then automatically turns these heaps overnight. It removes a compost heap piece by piece and rebuilds a new heap adjacent to the old one. This turning is necessary for making a homogenous substrate, watering all of the substrate equally, and keeping the process aerobic at all times. Through this method, the compost moves forward heap by heap, night after night, along the hall. After one week, it is sufficiently fermented to pass onto the next stage and is moved to the other end of the hall.

In the course of the project, we replaced an existing but outdated Siemens S5 PLC with a more modern system. Our initial evaluation showed that there is no software compatibility between this type of PLC and the current products from the same vendor. Because this meant a complete software rewrite in any case, we decided to do a more in-depth evaluation of systems on the market. Changing to a new system also gave us the opportunity to implement more functionality, making automatic crane operation more reliable.
We found that there has been surprisingly little evolution in the PLC domain for many years and that their simple architecture (single-task, circular program execution, no encapsulation of data, low-level programming language, etc) makes the creation of a large control program for today’s complex demands very difficult and time-consuming. In addition, the resulting code is difficult to understand and maintain.

System Architecture
Considering the severe disadvantages of the traditional PLC, we decided to write the entire application in G using LabVIEW because this program effectively overcomes the shortcomings of traditional PLC systems. The application runs on a Pentium III PC with 450 MHz under Windows NT 4. For the I/O hardware, we chose a FieldPoint system because it is relatively inexpensive compared to other possible hardware systems and can deal directly with the 24 V signals commonly used in automation. The control system for the rail crane has about 200 digital I/O points consisting of two racks of FieldPoint modules. An extension to automate the rest of the composting machinery in the same way is currently underway, so the system will ultimately control about 400 I/O points.

To our knowledge, this application is one of the first where such a pure, PC-based system completely replaces a PLC (there are "Soft-PLC" solutions on the market, but except for the hardware platform, they are not really different from a normal PLC).Initially, we had some concerns about the time behavior predictability of such a system. Our requirement for the response time is about 100 ms, which is equal or superior to PLC systems. Our experience shows that the LabVIEW application paired with FieldPoint can easily and reliably meet this need, even while using RS-232 communication (the Ethernet communication now used is still much faster).

One single task is reading and writing to and from the FieldPoint hardware. All other tasks interface to the crane through this communication via arrays. This is done to avoid a possible resource contention. For instance, if several tasks access the hardware simultaneously, this could then lead to a timing behavior, which is difficult to predict.

System Implementation
The software is divided into several distinct parts - the first is the basic control of the four axes movements (e.g. move to a certain position, close the fork, etc.), plus the control of all the auxiliary systems. This layer is always active in automatic as well as manual mode. We can control this system from the PC, from the main control panel, and via the "joystick" controls next to the crane itself. Second, we implemented completely automated procedures such that the crane can perform the mixing operation overnight without operator supervision (removal of the compost heaps and rebuilding them adjacently).

The third part of the software is the automatic error recovery functions. In our case, this is particularly important because the composting hall is a difficult environment where abnormal conditions can occur. For example, the crane can get stuck; the wheels can slip on the rails; the fork cannot close because it is too full; the crane cannot lift up because the load is too heavy, and so on. The system software must be designed to take such conditions into account and also have the ability to resolve them automatically (e.g. jiggle the crane forward and backward to make it move again; open the fork a bit, and shake off excess load etc.)
The fourth part are the visualization functions, which form an integrated part of the application. While the first part (the basic control) could be implemented with a PLC, it would be very difficult to implement the other parts with a PLC system. Many of today’s automation problems are not limited to simple control tasks, but rather complex processes that must run fully automatically. Modern systems of this type are also expected to imitate the behavior of a human operator in abnormal conditions and react "intelligently" in order to keep the necessary human intervention to an absolute minimum.

Conclusion
The LabVIEW/BridgeVIEW family is very well suited for automation applications. These platforms can replace a PLC in all aspects; in particular, the time response of these systems also easily meets or exceeds those of a PLC. In PLC-based systems, there will always be an artificial break between the control part and the higher functions such as visualization, statistics etc; which are programmed completely differently and run on different platforms.

In LabVIEW, all aspects of an automation solution of any complexity can be seamlessly integrated and programmed directly. These parts include the control functions, process automation, error recovery functions, visualization, database integration, statistics, and so on. Software engineers can write the entire application with one tool as opposed to using several.

No comments: