How to reset multiple AB counters easily

To robw53. Your other posts seem to suggest a familiarity with RSLogix 500 rather than the RSLogix 5000 which is the subject of this thread. In RSLogix 5000 the array is set up as shown above.
 
you would be correct, i am quite familiar with 500 but am starting to play around with 5000 having just bought it for personnel use.

the bit i am wondering is after you have given the array a tag like counter(200) how do you then put which counters you want into that array to be able to reset as a group
 
You couldn't, your code would have had to start out using the jerryHcounters[x] in your code instead of using discrete names. Think of it as a step back into RSLogix 500; C5[100] in SLC/Micrologix would be similar to jerryHcounters[100] in Compact/ControlLogix.
 
Even with all the counters in an array there would have to be some sort of self looping instruction or looping logic which resets each individual counter. Depending on the choices the resetting could take place in one scan or take place over a number of scans.

Think of it as a step back into RSLogix 500; C5[100] in SLC/Micrologix would be similar to jerryHcounters[100] in Compact/ControlLogix.

Except for the fact that RSLogix 500 doesn't allow the indirect addressing it's exactly the concept.
 
Last edited:
I probably would have just used the "Add" function instead of counters. I'd use consecutive addresses (in an array for C-Logix) as the accumulated value registers. They could then be cleared with a "FAL/FLL/COP" type command to zero the values when you need to reset them all at once...

In C-Logix, would it be possible to set up an array of Alias tags for the counter accumulators and fill it with zeroes to reset all the counters?
 
You can't do it the way you describe, but how about this?

Declare an array of type counter. Mycounter[200]
Create an alias to each element in the array. PartsInfeed, RejectStationA, etc. Use these in your code.

For master reset use a for-next (for I=0 to 199) that executes a reset instruction for Mycounter. This is the only code that addresses anything using the Mycounter tag.

Why does the silly editor *insist* on making the I in square brackets lower case? Beats me.
 
You can't do it the way you describe, but how about this?

Declare an array of type counter. Mycounter[200]
Create an alias to each element in the array. PartsInfeed, RejectStationA, etc. Use these in your code.

For master reset use a for-next (for I=0 to 199) that executes a reset instruction for Mycounter. This is the only code that addresses anything using the Mycounter tag.

Why does the silly editor *insist* on making the I in square brackets lower case? Beats me.


Yep, that's the best way I can see.
 
In C-Logix, would it be possible to set up an array of Alias tags for the counter accumulators and fill it with zeroes to reset all the counters?
You could set the ACC to any value but that doesn't address (no pun intended) the issue of the DN bits. To take care of those also you'd need the RES instruction, which does both.

Someone jump in if I'm wrong about this.
 

Similar Topics

Is there a way to reset 1 CONTROL Tag with 120 Arrays. DecMoveHeight[0]-[119] with one instruction? If so how is it structured. This is with...
Replies
10
Views
3,368
Is it possible to reset alarms on multiple PLC's by using one button on the FactoryTalk View ME screen. Each PLC has an independent reset bit, so...
Replies
1
Views
3,153
Hello, I still do not have equipment in to test. But the RTAC ladder does not have a timer reset coil. I wonder if a reset coil on Timer.IN is...
Replies
1
Views
21
Hi, i am using DVP-14SS2 PLC, after program written to plc, when power is reset, plc doesn't run. always need to connect to pc for the run mode.
Replies
0
Views
39
Hi need help why this “failure 5 emergency stop “ appears at every startup in the morning ? Have to shut off main switch at least 10 times on...
Replies
19
Views
351
Back
Top Bottom