First off, I never considered it heated
This has been very educational for me.
Those are hard real facts, this I agree with all of you, but I still think that you need to 'try' and make it user friendly, in the beginning I felt that Terry was not stating that and the KISS concept is a "good programming practice" that is what this thread was about.
This was a good heated conversation
The fact is there is no such thing as simple; therefore KISS can not be considered a form of programming, let alone good programming practice. Why would anyone limit there programming capabilities based on those not qualified to program?
Again I will state that in the last 4 yrs I have debated this many times, now I will offer my original thoughts
1. Maintenance personnel work hard to be good at what they do, they should not be expected to learn code.
2. Basically only ladder should be used because it was similar to relay logic so it may be easier to understand.
I was WRONG. IF someone needs to work with the code then they should be familiar with all instructions etc. If you do something YOU KNOW BUBBA can not understand then you have to provide a means for understanding.
In another thread rdrast stated he hated someone equating PLC programming to hardwired relay logic, though similar, it is not the same thing. I AGREE.
If you are programming to make it be like relay logic or for Bubba then you are not keeping it simple; as Terry states you are keeping it Stupid.
I reiterate, simple is not a term that is relevant because automation nor programming is not simple.
Took me awhile to understand, technically still borderline but I progress a little here and there.
There was one more thing:
Originally Posted by Peter Nachtwey
Did you know you can shift a value left by adding it to itself? Adding a value to itself 4 times will shift it left 4 bits....
Yes but that would of even made the program that much longer, because this would of had to be done numerous times.
You stated a 5/04, if so then why couldn't you have just moved whatever the value was to another register say N:10/0 then used CPT to add it 4 times then MVM for the value? Appears to me that would only be 1 or 2 lines of code and it could calculate values from different registers on each scan. This was just a thought from the comments made etc.
I did not look at the details of the ASCII because ASCII is not my strong suit.
BTW:
but I still think that you need to 'try' and make it user friendly
That statement also applies to what Terry has been saying, if operator friendly then maintenance will have less concerns or needs for working with the code i.e. if maintenance goes to machine and operator can state PExxx is not working all the better.