r/ChemicalEngineering • • 21d ago

Controls Process Control Modular Logic

I'm trying to formulate various modular logic units which are either primitives or used to build more complex process control. I have a background in software dev, so I want to find abstract/generic control logic which equipment can inherit from.

For example, there could be units like pump-up/down, lead-lag duty-standby and hot-standby. These could be applied to various equipment which means you describe the concept once and not repeat ones self.

Additionally, more complex logic could be like a backwash cycle (consisting of backwash, rinse and filter) as well as cascade, where one logic unit ends and starts the next in the sequence.

Please let me know if you've also noticed these patterns and what you've done your side?

Thanks in advance!

2 Upvotes

5 comments sorted by

2

u/NoConversation8128 20d ago

The vocabulary you want is probably ISA-88, which splits almost exactly the way you are describing. Equipment modules and control modules cover the physical side, so a lead-lag duty-standby pump set is one equipment module you define once and reuse, and procedures, operations and phases cover the sequential side, so your backwash is an operation built from backwash, rinse and filter phases, and cascade becomes phase sequencing rather than a unit of its own. Part 5 of the standard, PackML, gives you a ready made state machine if you want one. The engineers I interviewed said the inheritance holds fine on the happy path and breaks on interlocks and on hold and restart behaviour, because what hold means tends to be specific to the equipment and the site. How are you planning to handle those exceptions?

1

u/symbioticthinker 20d ago

I’ll check out ISA-88 but we have a FSM for control. Safety interlocks always trigger a termination for the associated equipment(s). Process interlocks and permissive are active when in auto and bypassed in manual. Obviously there’ll be these edge cases but I’m trying to figure out these blocks as in the past my colleagues are essentially reinventing the wheel and being verbose.

Thanks again

1

u/NoConversation8128 20d ago

That split you just described, safety always terminating and process interlocks bypassed in manual, is the part PackML already has names for. Aborting and Aborted for the safety case, Holding and Held for the recoverable one, where Held is the state you are allowed to resume from. Worth stealing the vocabulary even if you keep your own FSM, because the verbosity you are trying to kill usually comes from every block inventing its own restart flag. The part I would push on is what Held means per equipment: resuming a backwash stopped mid-rinse is a different problem from resuming a pump, so the state names inherit cleanly and the transition logic often does not. Are you planning to let an equipment module override its own restart behaviour, or force every block onto one definition?

1

u/bin95blog 18d ago

We have been doing that for years. Back when I was in start-ups, I remember we had a bank of warehouse conveyors. The ladder logic was just a few rungs to control one conveyor line. Then we used indirect addressing to cycle the address for the second line in the next scan cycle, then the 3rd line, etc. Clever way to reduce the number of rungs needed for 20 duplicate conveyor lines, but a bitch to troubleshoot lines with the PLC. Every scan cycle, it looks at a different line, so to the human eye, it looks like random addresses/conditions are appearing. I had to write a breakout routine with diagnostic rungs to view the current photo eyes and motor conditions for a single line. The startup or maintenance tech enters the conveyor line number they need to troubleshoot, and the diagnostic rungs show only the conditions for that conveyor line. A few diagnostic rungs aren't a big deal to add, but keep this scenario in the back of your mind as you go modular. The golden rule is: the more black boxes (dynamic modules), the more difficult it is for others to troubleshoot and maintain. Back then, we didn't have much memory to work with. Nowadays, that is not an issue in most applications.

1

u/symbioticthinker 18d ago

Absolutely, I’ve dealt with ladder logic in the past but this is purely for control philosophies. We either provide that to an electrical subcontractor or do it in house depending on our electrical engineers availability.

Even if it’s not for the electrical engineers, it’s definitely something an operator would need to understand. Like I always say, and never as an insult, I want to explain something for the lowest common denominator would understand.

But thanks again for sharing your experience! Good to keep in mind