please post your work (zip it first, forum rules) if it's the entire program and we will help. no one will do your home work for you.
+1
Post an image or a PDF as well, as not everyone here will have the same brand PLC and software as you, so they will not be able to look at your code using the manufacturer's IDE, but if they can review an image or PDF, then they may be able to help.
Also, a good place to start is @Ron Beaufort's PLC bootcamp videos
here, then the Patterns of PLC Programming pages
here.
The bootcamp video series is especially useful: they take less than 2h to watch the first time, but provide a solid foundation for understanding how PLCs work i.e. the scan cycle, even if you do not use ladder logic. Watching repeatedly until you can think Ron's words before he says them is also not a waste of time.
The Patterns of PLC Programming shows patterns the PLC programmers use over and over again in various forms, especially the Seal-In, Start/Stop, and State/Fault patterns.
Programming PLCs, and for that matter any programming of digital computers, involves "telling" the PLC what you want it to do. The trick to remember is that while the PLC cares
not a whit what you
want it to do, if it is not broken it will
very faithfully, precisely, and inexorably do
exactly what you
tell it to do. So the only hard part is making sure you do not tell it to do something other than what you want it to do. And the only diagnostic tools you will have are
- Interpreting how the PLC will behave when running the instructions you give it (see @Ron Beaufort's videos above);
- if you want to succeed, then you must always be ready to consider that your skill in doing this is less than perfect!
- Seeing the PLC do what you told it to do, and noting the difference between that and what you wanted it to do;
- this tool will almost always be far more reliable than the first, and if you want to succeed, will almost always be your standard for truth when there is disagreement between the two tools.
- The only times it will not give you truth are
- when you misinterpret what you are seeing, which will happen less frequently as you gain experience, or
- the PLC is broken, which will happen very infrequently.
- This forum, when you cannot reconcile 1 and 2.
To put it more succinctly, the quickest way to solve a problem in 99%+ of all cases is to
start with the assumption that the PLC's behavior, however strange and unexpected, is
exactly what you
told it to do, no matter what you
thought you told it to do.
Abandon hope, all ye who think otherwise and enter here ...
+