oh geez........when will the universal translator get built?
Yes, well, if you know how it is supposed to work, you don't have to worry about IF it will work. Not having a clear idea of how it SHOULD work is the major problem for students, and even more experienced new guys. If you cannot write a clear description in a rung comment, you have fairly well screwed yourself and then you will have to redo a bunch of rungs 2 days later. I recommend that students start with the rung comment, then make the rung action match what the comment says.
The other method is to place the cart before the horse and hope it runs okay, then change it 2 days later when you see you are not getting anywhere! Without a clear direction, you are just screwing around hoping to hit on the right solution (out of infinite possibilities).
Oh Lancie Lancie Lancie.........we are not in a classroom out here.
It seems that I have failed to arrange my words in such a way as to eliminate the possibility that someone might misunderstand my intended communication.
I will lay out a common scenario that happens to me so you can tell me where I am going wrong.
Step1 receive and read spec.
Step2 inspect hardware chosen by someone else that is supposed to be sufficient to accomplish the task, and of course has the lowest cost.
Step3 think about how to make the hardware do what the spec requests.
Step4 identify problem areas and ask for clarification from designer and customer. Because, you know, I just don't get it.
Step5 begin writing software following the steps I outlined above(see previous post).
Step6 the spec changes, designer discovers some error / edit / revision, etc...
Subroutine "corrective action"
At this point, I delete the work I have just spent a week or more on (including all those spiffy comments) and start that section over with the revised spec.
Step7 I get to a point where I discover that the machine, as defined, will not do some bit or it is just barely able to fulfill the spec most of the time.
Call a meeting, push some words around, force management to make a decision, then push for the solution to be ordered sooner , then push for information, then push for the new design update, then guess what..........
call "corrective action"
This can even happen more than once on a line.
Ok now all is well and you can even stay on schedule by changing your end of day to 9pm.
Step8 The customer submits a change order........oh boy.
call "corrective action"
This can continue for some time.
See where this is going?
Now following a "comment everything upfront" method ,I would have used a lot of time commenting everything for nothing.
Now to be clear, it sounds like my minimal comment would satisfy your idea of a starting point comment, so we could be having an argugreement on that point.
When I go back and comment after everything is working, I am referring to comments that do more than just read the logic in English.
That to me is a DUH comment.
What I add is "why" this is being done and sometimes I find it helpful to add where the data originates, and where it goes, which can not always be found with a search function. I also explain any indirect addressing or other information that might make it easier for someone else to see exactly what is happening in a few minutes.
Because I have spent weeks decoding PLC programs written by
"psuedo-commenters" who think a simple rung description is enough. Or even better no comment at all.
Now if you spend most of your career programing conveyors and waste water systems, this all sounds rather excessive.
Sure I can read the spec and write a comment and then write a rung of logic, is that enough? not really. Is it always that simple? rarely. Will it all change in a few days? most likely.
Not having a clear idea of how it SHOULD work is the major problem for students, and even more experienced new guys.
No that's the major problem for
everyone.
Some machines are sufficiently complex that the true function in exhaustive detail is revealed when the implementation of what the customer thought they were asking for meets the hardware that the designer thinks should do what he understands the customer to want.
The machine isn't done until it runs in production for a couple of months.
At THAT point the drawings can be finalized, the spec can be revised to reflect the true condition of the machine, and the final comments can be written with accurate detail.But by then no one is even paying attention.
Anyone who doubts the previous statment is not aware of the full cycle.
In a class room, you are dealing with a very simple version of a limited reality.
In a classroom:
We have a conveyor with 3 boxes and PLC X with Y outputs. This same hardware has been used for several classes and we have developed our project questions to address this hardware. (what can I do with this hardware?)
There is a definite solution to each challenge and all variables are known and accounted for. Nothing will be added or removed. The question will not change during the test. The due date will not change. You will not be pulled off of this project and put on something else twice in the next couple of weeks.
If it works that way in your world, you are missing all the fun.
And Lancie, really, stow the angry old man condescension.