Reply to post: Let me guess, the controller was a Siemens product, right?

Customer: We fancy changing a 25-year-old installation. C'mon, it's just one extra valve... Only wafer thin...

thames

Let me guess, the controller was a Siemens product, right?

@El Reg said: "Apart from anything else, all drawings and notes had been put in their possession, as per the original contract, and guess what? They'd lost them," said Geoff. (...) "First, the control sequence was not the same as what we'd been told, so we had to rewrite the program on-site to take this into account."

Been there, done that. You have to assume this is the state of affairs in any industrial retrofit project you go into. It seems to be almost standard practice in industry. You need to analyse the system and look for this problem well before the scheduled date of the retrofit so you aren't trying to deal with it on the fly.

@El Reg said: "We eventually realised the guy had discovered a way of bulk updating large blocks of data. He'd used this enthusiastically, blissfully unaware that it also corrupted variables in the 'gaps' that he wasn't using – but we were trying to."

Let me guess, it was a Siemens S5, right? There are instructions which directly overwrite absolute memory addresses. You can not only overwrite data, you can actually overwrite code as well. How do I know this? From having to debug a program written by one of the biggest equipment companies in their industry when everyone was convinced it was a hardware problem while it smelled like a software bug to me.

The problems with S5s was that as well as ladder they gave you access to a lower level instruction set that had powerful instructions comparable to assembly language, but which ran in an interpreter (except for some models which had a custom logic coprocessor running M5 instruction code, but that's another story). This looked sooo seductive to bored full time PLC programmers who would find "clever" ways of doing things instead of using less interesting but more readable methods. The more formal education the programmers had, the more they were inclined to do things like this.

The Siemens S7 series which replaced the S5s took away some of the more dangerous instructions, but added even more pointlessly complex low level ways of doing stuff. The result was of course loads of unreadable S7 code out there, which even the author struggles to understand. This more or less defeats the whole purpose of having a PLC in the first place, as the software is intended to be able to be understandable by non-programmer electricians. I think that some people see this unnecessary complexity as a form of job security.

It is comparatively easy to solve a complex problem with a complex solution. It seems to take least 5 to 10 years working in the field on a broad range of industrial problems before someone gains enough experience to come up with simple solutions to complex problems. Some people never seem to reach that point.

The best PLC programmers that I have met tend to be older electricians, while the worst seem to be younger electrical engineers. The former tend to think about how something is supposed to be maintained after they've walked out the door, while the latter tend to have trouble imagining that something they worked on could ever go wrong.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon