plc programming

jenny

Member
Join Date
Oct 2002
Location
pa
Posts
5
i am wondering if someone can show me a plc ladder program that would use counters,timers,and necessary logic that would represent a digital clock. hours displayed in binary format on 4 led,s. the minutes will move by a stepper motor, an am/pm indicator,
 
Since there are lots of ways to keep track of time that are more accurate and less expensive than what you've outlined, it's a pretty safe bet that this is an assignment for a class on PLC programming, and you're enrolled in the class.

The approach taken by most of us who frequent this site, when confronted with student requests for help with their coursework, is to ask the student to show us what he/she has already done, and then we'll offer suggestions on how to proceed.

There are several methods available to build a clock using ladder logic depending on the brand. I expect that your teacher is less concerned about the accuracy of your clock than about forcing you to consider how to use timers and counters in concert to keep track of hours and minutes.

Tell us what brand of PLC you're using, what you've done so far, and how you plan to approach the task.
 
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).
 

Similar Topics

Hello colleagues, Some time ago I started my adventure with programming. With your help and the courses, things are starting to come together...
Replies
13
Views
661
Dear All, I need a sample PLC program to count the output pulse of a mass flow meter so that a specific amount of mass (for example 100gm)can be...
Replies
2
Views
143
Hi Please I have zeilo smart relay #SR2A201BD but I don't have it's programming cable. Can I use any general usb/rs232 converter? Or need...
Replies
3
Views
130
Hi, Does anyone have thoughts or know of, can point in the right direction any published materials with a plumbing centric point of you explaining...
Replies
1
Views
161
@ All: what is your best guess on a potential range in increase in efficiency in % (i.e. saved programming hours, greater output, etc.) when...
Replies
5
Views
344
Back
Top Bottom