Programming Counter

fbarias

Member
Join Date
Oct 2006
Location
Florida
Posts
3
Good Morning my name is Freddy,

I have question from my PLC book a class that I am taking in school. I would like to see if some one can help me out with the question.

Suppose your accumulated value is 24 and you lose ac line power to the controller. When power is restored to your controller, what will your accumulated value be?

And I thought the question would be that it will restart all over again.

Thank you,
Freddy
 
Greetings Freddy and welcome to the forum.

The answer to your question is: "it depends."

Most PLCs use retentive memory for counters, that is, it will retain teh counter value thru a power cycle. Other PLCs may allow the option of programming the counter in retentive or non-retentive memory.

Is there a particualal PLC you are studying?
 
fbarias said:
Good Morning my name is Freddy,

I have question from my PLC book a class that I am taking in school. I would like to see if some one can help me out with the question.

Suppose your accumulated value is 24 and you lose ac line power to the controller. When power is restored to your controller, what will your accumulated value be?

And I thought the question would be that it will restart all over again.

Thank you,
Freddy
Need help with the above question.
 
how deep is this pool anyway? ...

Greetings Freddy ...



first of all, is this supposed to be:



(a) just a “simple” question? ... or ...



(b) does your instructor expect you to THINK and to possibly run some experiments in order to answer this properly? ...



if the answer is (b) and you really want (or need) to play “hardball”, then here are some more questions for you before we can fully answer the one that you asked:



(1) you said that we lose AC power to the controller ... do we ALSO lose power to the counter’s input? ... (example: to the switch or button in the field) ...



(2) is the “switch” in the field in the ON condition when the power goes off? ... or is the “switch” in the field in the OFF condition when the power goes off? ...



(3) is the “switch” in the field in the ON condition when the power comes back on? ... or is the “switch” in the field in the OFF condition when the power comes back on? ...



(4) is the “switch” in the field wired with AC line power? ... or is the “switch” in the field wired with DC power? ...



(5) if the “switch” in the field is wired with DC power, how “heavy duty” is the power supply? ... specifically, what is its “holdup” time? ... is this “holdup” time greater than - or less than - the PLC’s “power down” time when the AC line power fails? ...



that should be enough to (at least) get us started on the path to full enlightenment ... basic idea: if you follow it all the way through to the end, the seemingly “simple” question that you asked originally is NOT as simple as it seems ...



“survival” tip: your instructor probably just wanted a very simple answer to what he considers to be a very simple question ... just give him what he expects and get on with your life ... and in that case, my distinguished colleague Alaric has already given you the answer you require ...



tip for “beyond mere survival”: consider taking this question on as an “extra credit” project ... do the wiring (both AC and DC) and then run a full set of experiments to systematically cover all of the “switch” possibilities and then compare the results ... do a write-up - and even consider making a presentation to the class ...



caution: before you go the full route, make sure that your instructor won’t consider your “beyond simple” answer to be a challenge to his teaching ability ... some instructors have VERY sensitive egos ...



in closing ... here are a couple of quick questions for you ... how far do you really want to go? ... how much do you really want to learn? ...



good luck with your studies ...



and a final philosophical thought ... a wise man once said: “If the simplest things do not confuse you, then you obviously don’t know enough about them.”
 
Last edited:
for anyone who is interested, take a look at this figure ...

counter.JPG


the basic idea is that these two "counter rungs" will give different results in SOME of the situations that I mentioned above ...

dead giveaway: for the CTU counter, Alaric's answer will be correct ... and I'm sure that the operation of this "regular" CTU counter was the basis of Freddy's original question ...

going further: the "deeper" question is WHY will Alaric's answer be correct? ...

one specific question: suppose that the AC "field switch" was OFF when the controller's line power died ... suppose that while the line power is still off, the "field switch" is turned ON ... why doesn't the CTU count up when the controller's line power is finally restored? ...

next question: in the situation just mentioned (above) SHOULD the CTU count up? ... in some applications, the answer is "yes - the field switch SEES a new (valid) event which does indeed need to be counted" ... in those cases, you'll need some additional programming kung-fu to make the system do what you want it to ...

big hint: research "pre-scan" and how it affects the CTU ...

final thought: sometimes the answer is (or at least appears) simple ... but ... the underlying REASON can be quite involved ...
 
Freddy,

Click Here to download the instruction set reference manual for the SLC500 PLC from Allen Bradley's online literature library. This will be very handy to have and helpful to understand exactly how each of the instructions work. It also covers some of the nuances that our collegue Ron has hinted at.

For your reference, all AB manuals are available at
http://literature.rockwellautomation.com. I hope this helps and good luck with your studies.

BTW, we are more than happy to help out students with their homework, but we won't actually do homework programming assignements for students, but we happily give hints and mentor anyone who really wants to learn because most of us will agree the automation is a very rewarding career. So as your studies progress, please do make use of the forum.
 

Similar Topics

I don't have much experience in programming. I can do simple configuration. it is like this. i want to add something to the existing ladder...
Replies
39
Views
6,180
Dear PLC Experts, I am programming Omron CP1E. In High Speed Counter application, in earlier version PRV (67) function used but now PRV (881) is...
Replies
1
Views
5,150
I need to program a counter with an operator adjustable preset (to shut things off if the count doesn't reach the preset number between signals...
Replies
0
Views
2,999
Dear all, I have fx2n plc on my hand but I don't have the programming cable sc-09 and it would not be easy for me to get one. I need the cable...
Replies
3
Views
100
Hi all, i am the new controls guy at the plant and i have inherited a pc from the previous controls guy with Siemens tia portal version 16 and 17...
Replies
20
Views
876
Back
Top Bottom