Rants, Raves, & Random Thoughts

Shameless self-promotion of my writing skills or lack there of.

Wednesday, February 02, 2005

On 1s and 0s

I am so glad this week is almost over. I feel like my eyes are bleeding, my mind is turning to mush and I am slowly losing my grip on reality. I got off work today and it took me nearly an hour to shake out of my stupor.
I design and program control systems and PLCs. That’s my lot in life. It is my primary function for my company. They come up with an idea and I make it a reality.
“James, we would like to put in two new reactors on the south side of the plant. We will need to be able control pressure, flow and temperature. Oh, and we want it to be safe. Here is the sketch I drew on my napkin at lunch today. How soon can you get it done?”
“What kind of process are we going to be running through it?” I asked, scratching at the dried ketchup on the napkin.
“It will vary depending on conditions.”
And so the dance begins. The above scenario only happens on side projects. When we launch a major project, I have all of the information I can handle and then some. Either way, it is still pretty fun. Working with my DeltaV (DCS) is a cakewalk. It is so flexible and easy to use; it practically programs itself. I can build templates for a given instrument type and any time I make a change, it propagates to every point that is affected.
We have a few smaller packages that run on self contained PLCs that I can connect to my DCS through a serial link. These PLCs contain fairly simple programs and are easy to navigate for what little changes we have to make in them.
Then we have the granddaddy bastard of them all: The Lab. It is like having several tiny plants all encased in one building. When you open up the panels in this beast, you instantly get the impression that it is the red-headed stepchild of our company. This monstrosity is driven by four racks of PLCs and is wired with all the love and care of someone who just wants to make it work so they can get back to their “real” job. To give it the appearance of DCS level functionality, we loaded it up with nearly a thousand custom made special functions. Not to mention the hundreds of individual control loops, alarm indicators and solenoid valves.
So, last week, I was kicking around in my office, thinking of ways to streamline some of the sequential function programs that I designed during our last project when the phone rang.
“James, we have a run coming up in a couple of weeks that is pretty critical. I have come up with a set of calibration curves for each of our mass flow controllers and I was wondering if you could come up with a way that we could enter them and have the results displayed in real time to drive the controllers.”
It was the lab and they were asking for some more custom special functions. I freed up a little time and went to see what I could do.
I met with the man with the plan (Ronnie, I told you that you would mess around and make it into my blog.) and went over all of the details for the change. It actually looked like a fairly easy job. I punched out a prototype, tested it, worked out the kinks and commenced full-scale implementation. That’s about the time that it all went horribly wrong. I officially exceeded the limitations of the PLC. We came up with a slightly smaller list of critical loops and shortened the program. It wasn’t enough. The phone kept ringing of the hook. Portions of the program that weren’t even touched were suddenly changing of their own accord. To top things off, the entire system acted as if it was moving through molasses. The PLC had accepted the shorter program, but the execution times were slowly killing it.
I hopped back in the car and took another hard look at the program. There was a clear pattern of similarities in all of the special functions. I realized that I could drastically reduce not only the special functions but also the entire program if I used subroutines and just called them up when they were needed.
I pitched it, they liked it and the rest will go down in mind-numbing history. Nothing in the PLC propagates. I am changing the entire program one line at a time. To make matters worse, the HMI (Human Machine Interface) was full of five years worth of abandoned code. The deeper I dig, the worse it gets. I close my eyes and I see 1s and 0s, Vflag addresses and coil register numbers. I have already invested countless hours into this beast and it looks like I still have at least another twenty to go. On the plus side, when this is complete any other project that comes my way should look like a little slice of heaven.
Of course, I have learned a very valuable lesson from all of this: When the lab calls, don’t answer the phone!


At 4:03 PM, Anonymous Jim Cahill said...

Hi James, Great post! I was part of the original DeltaV development team as one of the marketing guys and am still with Emerson as the Marketing Communications manager. Good luck on your writing, your DeltaV, and avoiding those dreaded PLCs!

At 8:22 PM, Blogger James Goodman said...

Thank you, Jim; I am glad you enjoyed the posts.

DeltaV is a great product. I just finished upgrading one of my plants to V7.3 and I have to say that moving to XP was a great move.

At 5:57 AM, Anonymous Anonymous said...

Keep up the good work Dale earnhardt car floor mats washer neoprene effects of ativan ny mets 2006 tv broadcast schedule


Post a Comment

<< Home

Unclaimed Money Search - It is estimated that 9 out of 10 people are owed unclaimed government money and don't even know it! Find out how much you're owed with our free trial search.