Biggest of the filling skids on our site, 5069-L320ER on V33. The fill and CIP sequence is 30 steps, written by the OEM in ladder with a bit per step, 400 rungs of interlocked latches. Nobody here can follow it any more and the last change took a week.
The rewrite's landed on me and I'm normally the network and server side here, which is half of why I'm asking. Rewrite the lot in ST, or SFC, or leave it in ladder because our electricians only know ladder?
I tried an ST version of the first ten steps as a CASE on an integer and its 80 lines and I can read it fine, but one of our electricians looked at it for about a minute and walked off. So that told me something.
Which way would you go when the electricians only read ladder, because I'm not sure I'd get away with ST here?
Which part do the electricians open when the skid stops? The sequence itself, or the reason a valve won't open?
The valve reason, nearly always. They want the rung for XV107 and what's holding it off. They don't step through the sequence, they read which step it's in off the HMI and go from there. Might be different at a bigger site, I don't know.
Then the valve rungs stay in ladder. Seen this on a bottling line, OEM put everything in ST, maintenance couldn't find the interlock, and the plant paid to have it put back.
What's SFC here, is that the flowchart one with the boxes and the lines between? We only did ladder and a bit of ST at college.
Yes, steps and transitions, the boxes. Split it. The sequence goes in SFC or an integer state machine in ST, one place that says which step and why it moved on. The interlocks and every output go in ladder, XV107 = Step12 AND NOT Level_Hi, one rung per valve, the rung the electrician opens.
Mixed languages in one project is normal. One language for everything is the mistake, in either direction. Your CASE version already works, so keep it, put the step number and a step name on the HMI, and move the outputs back into ladder where they came from. There's a writeup on the languages here: https://plctr.com/introduction-to-plc-programming-languages/
Went that way. Sequence is the CASE in ST, 30 steps in about 220 lines, step number and name on the HMI. Every valve and motor has its own ladder rung with the step compare and the interlocks in it. The electrician found the XV107 rung himself on Tuesday, which he couldn't do in the old 400.
What made the mess was picking one language for the whole thing, first all ladder and then very nearly all ST. Splitting the sequence off from the outputs sorted it, and I was headed for the same mistake in the other direction, so that one's on me.
Still haven't decided between the CASE and a proper SFC. The chart looks nicer online but I'm not sure our Studio edition even has it. Thanks carav9, carlh and finn21.
Your electrician finding XV107 on his own is the whole result there.