Change Counter Acc in Code RsLogix

BigJohnT

Member
Join Date
Apr 2006
Location
Poplar Bluff
Posts
18
Can you change the value of a counter Acc in code with RsLogix on a 1500 micro?

I have some sequence logic that uses a counter to control the sequence. In some cases I need to back up the counter.

Thanks
John
 
Last edited:
BigJohnT said:
Can you change the value of a counter Acc in code with RsLogix on a 1500 micro?

I have some sequence logic that uses a counter to control the sequence. In some cases I need to back up the counter.

Thanks
John

yes, a move instruction will work. MOV n7:0 c5:0.acc

Also SUB, ADD, DIV, or MUL.
 
BigJohnT said:
Thanks, I did not even think about the math instructions (slapping forhead)

John

I belive the CPU will fault if the counter/timer accumulator gets a negative number in it though. Some range checking would not be a bad idea.
 
jstolaruk said:
I belive the CPU will fault if the counter/timer accumulator gets a negative number in it though. Some range checking would not be a bad idea.

That's for sure something like -32647 to 32648 or some number like that will fault the cpu.

THanks
John
 
The PLC will fault on negative numbers for timers. However counters do just fine with negative numbers in the PRE and ACC.
 

Similar Topics

Hey all, i have a panelview screen (image attached), with 4 items on it. Program 1, Program 2, ...3, ...4. The PLC i am using is a compactlogix...
Replies
5
Views
127
Greetings I have a problem, my system is the following: wincc v8.0 (demo), logo8.3, abb m2m analyzer. I created some pages to display the...
Replies
0
Views
48
We had one go down. we have a new one. Their emergency Number don't work. The Model is TLSA046AAH-330N01-007 A catalog says we need software TET...
Replies
2
Views
164
“The HMI files we cannot open—they were saved in V13—we do not have that—I cannot restore file –please have them save in V11 and send them back to...
Replies
4
Views
166
Hi guys! I'm working in Studio 5000 and have a bunch of armorstarts there (+- 40). I need to set up parameters for each of them, mostly just same...
Replies
0
Views
86
Back
Top Bottom