What James said.
You're going to find, as you program machines, that the problem isn't in running them. Running is usually pretty easy. It's the transitions that are hard. Changing states from Off to Start to Run, or Run to Off, or especially E-Stop to Reset. Hint: What happens to all those latched relays when I hit E-Stop? When I press Reset after removing the E-Stop? When I press Start after resetting the E-Stop?
It's also in error handling when an actuator fails, a sensor fails, or the machine is set up for Product 1 but the OPR starts trying to run Product 2.
A really really long time ago, one of my college profs had a catch phrase that has been very applicable to machine programming. He was an ME, but still. It was a design course, and he'd always say "Boys," (hey, I said this was a LONG time ago!) "Boys, you have to ask yourself... How can it fail?"
Turns out that is machine programming in a nutshell. So, as you write the logic, look at it and ask yourself that question. At the least, you have to handle failures or incorrect situations without hurting the people, the machine, the product... usually in that order. At best, you want to provide automatic recovery, or simple manual recovery.
Welcome to the forum, and have fun! The greatest thing about being a controls guy is that your job... is to make it go!