AW HONG SENG

Request help of the following counter example

4 posts in this topic

Could someone please explain the operational principal of the following ladder logic?

As I have studied quite a long time, but it seemed to me that the solution is incorrect.

Problem:

A motor will be connected to a PLC and controlled by two switches. The GO switch will start
the motor, and the STOP switch will stop it. If the motor is going, and the GO switch is thrown,
this will also stop the motor. If the STOP switch was used to stop the motor, the GO switch
must be thrown twice to start the motor. When the motor is running, a light should be turned on
(a small lamp will be provided).

 

solution.jpg

Share this post


Link to post
Share on other sites

This has to be a school project.  Nobody in industry would really want a system to operate like this and nobody would call it a GO switch.

There are several things wrong before we even get started.

1. It looks like the author assumed a reset would set the accumulator to 1 instead of 0.

2.  Have to assume the stop PB is a normally closed contact and the go PB is a normally open - pretty normal but should be spelled out. Also I am assuming this is an AB processor due to the counter addresses.

3.  Assuming that the counter did reset to 1 then the program will still not work as required.  The first press should increment counter c5:0 and set the done bit which will in turn activate the counter down logic in the last rung.  This will change the accumulator value of both counters interestingly making C5:1 a 0.  The next press of the Go will not cause the motor to stop as the accumulator will be a -1 at that point.  Decrementing the accumulator for C5:0 will cause the done bit to reset.

4.  Even if C5:1 could get a done bit from this logic, the next rung would reset it when it went to done. Thus the motor rung on the first rung would never see that done bit. 

5.  The plus is that the stop pushbutton would stop the motor and the go button would start it.

Edited by PLCMentor.com
correction
2 people like this

Share this post


Link to post
Share on other sites
7 hours ago, PLCMentor.com said:
7 hours ago, PLCMentor.com said:

Hi PLCMentor,

Thanks for you help.

Could you please explain 3rd point statement more?

3.  Assuming that the counter did reset to 1 then the program will still not work as required.  The first press should increment counter c5:0 and set the done bit which will in turn activate the counter down logic in the last rung.  This will change the accumulator value of both counters interestingly making C5:1 a 0.  The next press of the Go will not cause the motor to stop as the accumulator will be a -1 at that point.  Decrementing the accumulator for C5:0 will cause the done bit to reset.

My doubt:

First press of GO switch=> accum. of C5:0 and accum. of C5:1 are both equal to 2. So, the counter C5:0 /DN =1 and Counter Down in last rung is activated.

Hence,accum. of C5:0 and accum. of C5:1 are decremented to 1. 

As your reply, I cannot understand the following statement why both counters interestingly making C5:1 a 0. 

The first press should increment counter c5:0 and set the done bit which will in turn activate the counter down logic in the last rung.  This will change the accumulator value of both counters interestingly making C5:1 a 0. 

 

 

Share this post


Link to post
Share on other sites

Ahgggk!  You are correct!  I dont know where my brain was with seeing C5:1 going to 0.  It will increment up and down with C5:0. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now