jenny said:
...the minutes will move by a stepper motor....
How's that? Will you have a board with the numbers 0 through 59 on it, and the motor will dirve a pointer to the correct minute?
Break the project down into phases.
Phase 1. Get the time. Some PLCs have internal clocks, some don't. If it doesn't (and maybe even if it does), you need to build a clock. How? 1 second self-resetting timer drives a 60-count "seconds" counter. When the counter is done, it increments the 60-count "minutes" counter and resets itself. Etc.
Phase 2. AM/PM. Drive the LED based on the value in the 24-count "hours" counter.
Phase 3. Hours. Step 1. Define your I/O. What does each of the 4 LEDs represent. Step 2. Drive each one based on the value of the ""hours" counter.
Phase 4. Minutes. Step 1. Define your I/O: How is the stepper motor supposed to move? When it gets to the end, what does it do?
Step 2: Write a program that makes Step 1 happen.
Like most things in college, there are no shortcusts.
Three things to keep in mind:
The Prof, TA, tutor, whomever, is your EMPLOYEE. YOU pay for HIS services. It is up to HIM to deliver to YOUR satisfaction. But it is your "job" to give him his performance review by way of asking questions of HIM (not US) until he has delivered his "product" (i.e., knowledge, education)
The Prof, TA, tutor, whomever, already knows how to do this. He isn't looking for the answer, he's looking for YOU (not US) to go through the process of learning. Part (a large part) of that process is making mistakes. Each mistake brings you that much closer to the final answer.
Why would you trust any answer that a bunch of semi-sane strangers would give you for free on the internet over one that you would work out yourself? Or one that your prof would guide you to?
Just because we're "experts"? We make mistakes too (bigger ones than you may ever make - costing thousands of dollars (or perhaps even injuring someone, peraps permanently). And we've been know to deliberately give the wrong answer, just to discourage students from posting their homework.
If you post your code, and ask "Why isn't this working?" we'll help, and explain why (or at least give you hints as to how to troubleshoot it yourself). But don't expect a free ride. Unless you WANT a buggy ride (puns intended).