QUOTE (JAK @ Oct 11 2009, 12:49 PM)

I found several point in the program that the OFE was using BCD but he cards have been changed to 2's comp. binary.
What a mystery? I keep hearing those guys that setup that line didn't know rhat they where doing. Have you ever notices that nobody every programs as good as you do.
What I've found is that my coding style is significantly different from others. I like it. Others hate it or are at least neutral about it. I can read theirs. They can usually read mine. If I work on their code, I often find myself rewriting everything over time. So we just agree to disagree. Everyone has their own particular "style", for better or worse. Some are better than others.
My worst hangup is that I can't stand seeing "MOV 0 xxx" (I convert it to CLR) or worse yet, CPT xxx <-- xxx+1. I always strength reduce whenever possible.
I've had countless folks demonstrate why they don't understand BCD arithmetic. For instance one plant I worked at converted everything into BCD and then back again in the same program and never used the intermediate result. After doing a little searching I found out that at one time, they had the old thumbwheel devices that actually use BCD arithmetic for inputs so you'd get settings of 000-999. Later on to save time in programming, they simply converted the HMI values into BCD and then left the rest of the code alone. The local electrical department didn't understand all this so they started using it without understanding the purpose (there wasn't any) and mostly felt that it must be "right" because it automatically limited the operator inputs to values of 0000-9999! Imagine how much they freaked out when I rewrote everything without any BCD arithmetic...since they actually believed this stuff was a necessity and had to be done on all numerical inputs.
QUOTE
The same person that made hat statement also said that he tries to configure those cards but the other guys had it to screwed up. He did fail to offer this when the operators can't get a manyal mode on a PID to work.
That sounds like a simple training issue. Most people aren't actually trained how to write code for PLC's, or trained poorly at best. They usually get thrown into it or figure it out on their own. Very few colleges offer courses in PLC's, and I've never seen a computer science department that teaches PLC programming or PLC programming methodologies. The result is that most PLC programs are very, very bad.
In terms of methodologies, it is frequent to see very bad programs with lots of one shots and latching instructions. This is characteristic of transition logic instead of state-based logic. Similarly, folks that have never been exposed to state machines often write code based almost purely on external state. The result is a nasty "onion skin" type logic that is also very hard to debug and often breaks if events occur out of order. In terms of basic skills, logic skills such as strength reduction (MOV 0 xxx becomes CLR xxx) and logic simplification are not taught, leading to very ugly input logic statements that are again, hard to debug and read. All of these lead to even uglier programming practices down the road.