counter comparision

Hojland

Member
Join Date
Oct 2006
Location
Langå
Posts
203
How do I get an "examine if closed" to go high when my counter is 1 acc.
I kown you can make a comparison but I thinke I have don it with out. Somthing like C5:0.ACC/1
It is in logix 500
 
Keep it simple any easy to understand you said that you have done it with a compare instruction so donut that way

Setup a condition that will count up or down your counter
Then on the very next rung use an equal to instruction with an OTE in series

So when your counter is equal to 1 the OTE energizes
The. You can use the OTE as an XIC input and that should be it
 
It is in logix 500
That makes is easy. In RSLogix500, simply set your Counter Preset = 1, then use the Counter DN bit in your XIC. For example if your counter is the first one, C5:0, then use XIC C5:0/DN, which will go high when the C5:0.ACC = 1. Also, you can use C5:0/CU, which goes high each time that the counter is triggered and counts up. Bit C5:0.ACC/0 will alternate ON-OFF each time that the counter counts up.

Counter Comparisons- Hojland.JPG
 
Last edited:
The /number is the ACC Word's Bit Number. Therefore /0 will be true when ACC = 1 and /1 will be true when ACC = 2 And Both will be on when .ACC = 3 so you can use the Binary combination of Bits to determine the ACC Value. As Lancie pointed out the /0 would alternate with each count because it's bit zero of the Accumalator word.
 
The OP only wanted to know when the counter accumulator = 1.

Lancie1, the .DN bit will be set true whenever the counter accumulator is >= 1, even if the rung is false. The rung comment you have attached to rung 1 is misleading. The .DN bit will be set for ALL situations where .ACC >= .PRE, regardless of the actual values. Setting a PRE of 1 does not stop the counter counting past that value.

cwal61, same comment, to get to = 1, you would have to interrogate all 16 bits of the .ACC value to determine if it is = 1.

Therefore, EQU is the best way to test for .ACC = 1

Hojland - inspecting bit 0 of the .ACC will only tell you if the count is ODD, (bit 0 On), or EVEN, (bit 0 Off). Inspecting bit 1 tells you very little about the accumulator value, you will not know whether it is odd, even. However, if bit 1 is on, the counter accumulator cannot be equal to 1. The converse, however, is not a true statement.

dbh6 posted what I consider to be the best answer, given what was stated in the OP
 
Last edited:
Daba, I believe the statement I made was you can use the Binary Combination of Bits To Determine The ACC Value. I did not mean or intend to project that the 0 Bit would only be on when the counter is = 1. That being said bit 0 will be true when the ACC is = 1 and I also stated it will be on along with bit 1 when the ACC value is = 3. And Lancie Statement of bit 0 alternating on each count would also hold true.

Now I Agree Use the EQU is the Best And Easiest Approach. But I interrepted The OP question was addressing the Accumalator Value using the / and a number. The whole point of my post was to identify the / is used to identify the bit level of ACC word.

OP original Post

How do I get an "examine if closed" to go high when my counter is 1 acc.
I kown you can make a comparison but I thinke I have don it with out. Somthing like C5:0.ACC/1
It is in logix 500
 
Last edited:
Daba, I believe the statement I made was you can use the Binary Combination of Bits To Determine The ACC Value. I did not mean or intend to project that the 0 Bit would only be on when the counter is = 1. That being said bit 0 will be true when the ACC is = 1 and I also stated it will be on along with bit 1 when the ACC value is = 3. And Lancie Statement of bit 0 alternating on each count would also hold true.

Now I Agree Use the EQU is the Best And Easiest Approach. But I interrepted The OP question was addressing the Accumalator Value using the / and a number. The whole point of my post was to identify the / is used to identify the bit level of ACC word.

OP original Post

Yes you did state that you can use the binary combination of bits to determine the .ACC value, but I went on to say that to test for 1 specific value, you will need to test all 16-bits, OK I made a mistake, you don't need to test bit 15, because a timer .ACC cannot be negative. I was hopefully making the point that "bit-picking" is a grossly overkill method of determining a 16-bit value when A-B graciously provided the EQU instruction.

Your discussion of using the bits in the .ACC may have been misleading, my reply was intended to steer the OP from thinking about accumulator bits if, and only if, he only wants to test for one specific isolated unique value.

I certainly wasn't critiscising your post, merely pointing out that all the bits are significant, and all need to be tested if you want to know one .ACC value
 

Similar Topics

Hi Guys, I have a 1769-L24-QBFCB1 that has the OK light flashing on the embedded counter module. The manual states it is a resettable fault, but...
Replies
0
Views
119
Hey Everyone, After reading a lot on this forum and elsewhere I see not many are fond of the 1794-VHSC module. I can see to a degree as I was...
Replies
3
Views
185
Hello Folks, Has anyone configured a Momentum high speed counter on Unity 13.1. We need the wiring diagram for Momentum High speed counter and...
Replies
0
Views
89
Hi all, I am working with an incremental encoder (ABZ signals, 360 ppr (so 1440 counts per rev)) to replace the existing "manual" encoder wheel I...
Replies
51
Views
2,702
Hi y'all Just a quick question for using Rslogix 5000 I'm using a counter up bit with an analog signal (0-10V). When 10V is measured, counter...
Replies
5
Views
243
Back
Top Bottom