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

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
136
“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
135
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
75
Hello brothers We are contacting you because an error like [display change is currently controlled remotely] occurred while using the equipment we...
Replies
2
Views
173
Hi all. I'm trying to set up communication between a 1756-L72 (EN2TR) and a 1756-L82 (CPU port) using produced / consumed tags. From the L72...
Replies
13
Views
343
Back
Top Bottom