counter instruction ?s

welcome to the forum ...

what type of PLC are you working with? ... (give both the brand and model please) ...

the reason that I'm asking is that most Counters do NOT "reset" after a power cycle ... specifically, whatever number was stored in the Accumulator will still be there when the power comes back on ...

in other words, it sounds like you're trying to program something special - that's already "standard operating procedure" ... is it possible that maybe you've misunderstood the instructor's instructions? ...
 
Last edited:
allen bradley slc 500, excuse my ignorance i just started with plcs, everything i have bn taught says u have to have a reset instruction included.this program consists of testing the quality of parts with recline positions and forward position and a fault timer,counting the 2 cycles up to 10,000 timesbut the mod is to keep tyhe counter from reseting if power is lost without adding new hardware
 
Make a simple program with a single counter incremented by one input and reset by another. Run it, incrementing it a few times. Note the count. Now kill power to the PLC. Turn it back on and note the count. Sometimes it's best to just try it and see.
 
we are not using a real plc , my instructor just give us a program and wanted us to modify it. i am new to this so plz bear with me i really want to learn programming
 
we are not using a real plc , my instructor just give us a program and wanted us to modify it. i am new to this so plz bear with me i really want to learn programming


So the existing program resets the counter on power up, and you have to modify it so that it will not reset?

In the SLC 500 and Micrologix processors, the Counter accumulator value is retentive. It is only reset if you give it specific instructions to reset, for example a RES instruction or a MOV instruction that moves 0 into the counter's accumulator (.ACC).

So somewhere in the instructor's pre-made program, he/she is reseting it on power up. Likely with the First Pass bit. The first pass bit is a special bit that is true only during the first scan of a program. It is handy when you need to initialize things during a power up. I believe in the SLC500 and Micrologix it is the S:1/15 bit. If you open the S file it will show it (as well as other system bits).

Start by cross referencing the Counter address and looking for any usage of it. It will tell you the address used and what instruction it's being used in. Likely the program isn't very large being that it's teaching program, so it may be easier just to glance through the rungs.
 
we'll be glad to help - but we really don't like to hand things to students on a silver platter ... (note that I am NOT implying that you're asking us to do that) ...

the problem is that we're not sure how to help you – based on what you've told us so far ...

suggestion: can you post the actual exercise that the instructor gave you? ... maybe if we take a look at it we can come up with some suggestions that would help you get started (without thwarting the educational experience) ...

and here's a friendly tip:

quit using those abbreviations ... type out "please" instead of "plz" ... type out "been" instead of "bn" ... type out "you" instead of "u" ... many (most?) of us on this forum are cranky old coots who find those abbreviations highly annoying ...
 
Last edited:
many (most?) of us on this forum are cranky old coots who find those abbreviations highly annoying ...

Ditto


And if someone has not already ask, post your program here and someone will take a look.
 
thanks for the help i am trying to upload the program but it tells me the file is too big if someone knows how to shrink the file i would appreciate the help
 
thanks for the help i am trying to upload the program but it tells me the file is too big if someone knows how to shrink the file i would appreciate the help

Compress the file into a zipped folder. Windows can do this natively I believe. Right click on the file and go to the "Send to" submenu. Then choose Compressed (Zipped) Folder.

PLC programs are usually pretty small though, especially the type that is just made up to do simple things like show students basic examples.
 
try using WinZIP to zip it first ... what type of file is it? ... specifically, what is the file extention? ... if it's RSS then you've got to ZIP it to post it on the forum ... if you can't post it, you can email to me and I'll post it for you (if possible) ...
 
from your first post:
have to modify a program in which the count up instruction must not reset if power is lost

I've looked at the program you emailed to me ...

look at the rung that Resets the Counter – and think about what the EXISTING condition calls for ... then come up with a different set of conditions to achieve the DESIRED operation ...

the stuff that you sent was marked "Final Exam" ... what's the story there? ...
 
Last edited:
from your first post:


I've looked at the program you emailed to me ...

look at the rung that Resets the Counter – and think about what the EXISTING condition calls for ... then come up with a different set of conditions to achieve the DESIRED operation ...

the stuff that you sent was marked "Final Exam" ... what's the story there? ...

Uh-oh... busted!
 

Similar Topics

In this project I wanted two pumps to alternate between lead and lag. The controller is a Micro810. I'm using a counter to dictate whether pump 1...
Replies
4
Views
1,099
Have a program I may have to translate from Logix 500 to 5000. The customer is using the "UA" flag on several counters. They're also using the...
Replies
5
Views
1,979
The counter instruction has an OV, a UN and a UA flag but they don't seem to do anything. For example, the OV (over flow flag) doesn't turn on...
Replies
5
Views
3,863
hi guys, just new to plc. im using cj1m cpu22 currently working on a program that measures distance by means of a rotary encoder if my...
Replies
2
Views
3,743
Hi all! Am quite new to Allen Bradley PLC programming and currently working on the automation of a pumping station. The project requires 2 pumps...
Replies
5
Views
6,248
Back
Top Bottom