...
10. write the plc program using your notes in a step by step manner.
10A Over half way through writing the program you WILL realize a different/better way of doing something you are almost done writing
(or a new spec will require it) and you will completely rewrite it
10B It WILL happen more than once.
...
It is incredibly useful to think in this manner as suggested by JamesM: it is one of the essential pieces, specifically humility, of an "agile" approach.
Another aspect of this is that, when faced with an overwhelming task and perhaps being frozen not knowing where to start, you are free to instead solve a single piece of the problem at a time, knowing that nothing is set in stone down the road. Then you solve another piece, and another, and then you start connecting them, etc. I often don't know I am done until I ask myself "what's next" and the answer is "nothing." If one piece won't work with another, then it's only a small change to try a different approach for one or both pieces.
For example, from the problem statement, there will be a period of time, call it "pushing now," when all the steps are focused on pushing a labelled box into the chute. Calculating and having a bit that is 0 outside that period and is 1 during that period might be useful. E.g. when it is 0, the conveyor motor can run and the cylinder is inactive, and when it is 1 the motor should be stopped and the cylinder sequence can be followed.
- that period is triggered (STARTed) by the photocell reading a label, which changes an input (call it LABEL_FOUND) from 0 to 1;
- that period is completed (STOPed) when the cylinder completes its retraction, which changes another input (call it RETRACTED) from 0 to 1;
- sometime during that period, well before it completes, the label will be pushed out of view of the photocell and input LABEL_FOUND, which started the period, will change from 1 back to 0, but you will still want the steps in that period to continue.
- These events suggest something like the Start-Stop pattern, with LABEL_FOUND as the Start contact and RETRACTED as Stop contact; the seal-in contact of the output bit will maintain the output bit as 1 even after the label leaves the field of view of the photocell.
- However, at the start of the period, the RETRACTED bit will initially be 1, which means it must somehow stop the period when it is 1 at the end, but not keep the period from starting when it is 1 at the start. So the raw RETRACTED input cannot be the Stop contact.
That is a typical thought process; the point is to keep poking around solving the small problems. In the end there may be better ways to signify "pushing now," but following that thought process, and seeing its weakness*, makes it easier to either to add some logic that eliminates the weakness of that approach, or to think of an alternate approach that accomplishes the same thing. Whatever approach you take, the problem of when to run the motor and when to turn it off will be solved, and you will be closer to the end of the task than when you started.
*
RETRACTED needs to be ignored at the start and noticed at the end
P.S. Note that JamesM's point 5 also fits into this incremental approach: write down the sensors as the need arises; the problem statement asks for a list of these, but until you know your approach and have thought about the process, you will not, even
CAN not, know what sensors are needed.