Storing Timer ACC

Krilun

Member
Join Date
Aug 2008
Location
Cleveland
Posts
44
Hey guys,

Background: I am using RSLogix 5000 function block diagrams to time how long a pump is running. When the pump is running, the timer gets enabled and when the timer is running for 60 seconds it increments a counter to keep track of minutes. The timer ACC represents seconds.

The problem: When the pump stops, the ACC goes back to 0. So if the timer ACC is 45 (representing 45 seconds) when the pump enable signal goes low, the ACC goes back to zero.

The Question: Does anyone know how to store the timer ACC value when the timer enable goes to zero?


Any sugguestions would be extremely appreciated.
-Ken
 
-||- (Timer Enable) MOV TMR.ACC, ACC_Storage_Reg

Use the timer enable bit with a MOV instruction from the .ACC to storage tag. That way when the timer turns off the value is stored until the next time the timer is enabled.
 
I wouldn't go at it from that angle. use a retentative timer instead and have it go for 6 minutes, then every 6 minutes add 0.1 to your "run time" hours. Instead of showing 36089 minutes, it would show 601.48 hours.
 
bernie_carlton.... your method worked. After your post I pulled out a PLC book from college and looked up how RTORs work and it works the EXACT way I want it to.

bosko... thank you for your sugguestion. That is very smart and I will probably end up implementing that.
 
i usually end up counting seconds. The time resolution is fine enough for me, you can have a LOT of seconds in a DINT and you don't have to worry about resetting the timer.
 

Similar Topics

Hi, I'm trying to figure out how to store a timer value in a datablock to keep a record of the time it takes for a press to close. I'm a bit more...
Replies
4
Views
1,869
HI all, I have a backup from a Series 7000 Cognex camera. I am trying to restore and see the vision tools used in the job. Can I restore those...
Replies
0
Views
55
Hello, I have an int variable that updates the value every second. I want to store the 100 values in an array. Array should keep storing the...
Replies
7
Views
949
Hi I have a vision camera that I’m getting the string data P908765 from the vision on an advance trigger .which im using a S -move. Then I put...
Replies
1
Views
364
Hello You guys helped me with a similar issue some time back on storing totalized values to different tags each month. I have a similar issue...
Replies
19
Views
1,383
Back
Top Bottom