The benefits of reusing control logic

Don’t think it’s lazy—reusing effective control system strategy and programming can help you identify problems.

02/19/2013


The first large project I worked on in my career taught me that reusing code isn’t just a way to get more done with less effort; it is also makes problems that have nothing to do with the code very obvious. Let me explain:

The project was a new 40 million gallon-per-day wastewater treatment facility in South Carolina. The commissioning of the plant went very well, and all systems checked out. A few weeks after commissioning, I was sent back to the plant because they were having a problem with their effluent pumps.

Three effluent pumps were set up in a lead-lag configuration that followed the level of the effluent wet well. When the level got high, the pumps would turn on and pump down to the low level. If one pump couldn’t keep up, a second pump started. The logic seemed to be working correctly, except the pump didn’t always stop when the level got low. The customer was very concerned that the pumps could have already been damaged by running dry.

I studied the data on the historical trends, and it appeared the problem only happened on the second pump, which the operators confirmed. The customer concluded that it must be a PLC issue and insisted we look for the solution there. My conclusion was different: I was certain that this was not a PLC issue. I was certain because I used the same logic for turning every pump on and off based on the level. If the other pumps always worked correctly, I knew there had to be something wrong outside of the PLC.

The customer was skeptical, so I started looking for a way to examine the problem and prove that the code was solid. This was a very important customer, so I had to take care of the problem quickly.

Luckily, the interposing relay used in the control cabinet had a spare set of contacts. This was a good point of demarcation for proving the PLC programming. I tied the spare set of contacts back to a spare digital input on the PLC and added that point to the history collection system. I then let the system run all day and all night.

The next day, the historical trend showed the PLC output turned off an hour before the pump finally stopped. The PLC did indeed do the right thing. The customer called in the motor controller supplier and had the contactor replaced. They never had a problem with the pump again.

I learned a valuable lesson: reusing effective code properly is not being lazy, it is good design.

This post was written by Matt Dougherty, Engineer II at MAVERICK Technologies, a leading system integrator providing industrial automation, operational support, and control systems engineering services in the manufacturing and process industries. MAVERICK delivers expertise and consulting in a wide variety of areas including industrial automation controls, distributed control systems, manufacturing execution systems, operational strategy, and business process optimization. The company provides a full range of automation and controls services – ranging from PID controller tuning and HMI programming to serving as a main automation contractor. Additionally MAVERICK offers industrial and technical staffing services, placing on-site automation, instrumentation and controls engineers.



No comments
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by...
Each year, a panel of Control Engineering editors and industry expert judges select the System Integrator of the Year Award winners.
Control Engineering Leaders Under 40 identifies and gives recognition to young engineers who...
Learn more about methods used to ensure that the integration between the safety system and the process control...
Adding industrial toughness and reliability to Ethernet eGuide
Technological advances like multiple-in-multiple-out (MIMO) transmitting and receiving
Virtualization advice: 4 ways splitting servers can help manufacturing; Efficient motion controls; Fill the brain drain; Learn from the HART Plant of the Year
Two sides to process safety: Combining human and technical factors in your program; Preparing HMI graphics for migrations; Mechatronics and safety; Engineers' Choice Awards
Detecting security breaches: Forensic invenstigations depend on knowing your networks inside and out; Wireless workers; Opening robotic control; Product exclusive: Robust encoders
The Ask Control Engineering blog covers all aspects of automation, including motors, drives, sensors, motion control, machine control, and embedded systems.
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
News and comments from Control Engineering process industries editor, Peter Welander.
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
This is a blog from the trenches – written by engineers who are implementing and upgrading control systems every day across every industry.
Anthony Baker is a fictitious aggregation of experts from Callisto Integration, providing manufacturing consulting and systems integration.
Integrator Guide

Integrator Guide

Search the online Automation Integrator Guide
 

Create New Listing

Visit the System Integrators page to view past winners of Control Engineering's System Integrator of the Year Award and learn how to enter the competition. You will also find more information on system integrators and Control System Integrators Association.

Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Control Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.