You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old February 7th, 2018, 08:01 PM   #1
backendcode
Member
Canada

backendcode is offline
 
Join Date: Aug 2017
Location: brampton
Posts: 240
Implement logic! need help please

Hello guys, Just wondering if someone can help me please

I have a timer when gets enable I move .acc value of that timer to another tag to store the .acc value but next time when the timer gets enable again, it overwrites the last stored value of .acc into that tag.

but I would like to add the new accumulator value of that timer to existing value of my tag where I am storing .acc value.

Or is there any timer which keeps the value of .acc (Don't set to zero) when become disable and I can reset that .acc value at 7 am which I will use GSV instruction to get that time.

Thank you,
__________________
Junior Control Engineer
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live
  Reply With Quote
Old February 7th, 2018, 08:05 PM   #2
bkottaras
Member
United States

bkottaras is offline
 
Join Date: Oct 2005
Location: Chicago
Posts: 1,645
Quote:
Originally Posted by backendcode View Post

Or is there any timer which keeps the value of .acc (Don't set to zero) when become disable
Retentive Timer RTON
  Reply With Quote
Old February 7th, 2018, 09:08 PM   #3
backendcode
Member
Canada

backendcode is offline
 
Join Date: Aug 2017
Location: brampton
Posts: 240
Thank you
__________________
Junior Control Engineer
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live
  Reply With Quote
Old February 8th, 2018, 04:48 AM   #4
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,372
It is just RTO - not RTON.

It works exactly the same as a TON, except that it doesn't automatically reset when disabled. To reset it, use the RES instruction, with the timer tag name as the parameter.

It sounds like you don't ever want it to "time-out", because if it did it would just "freeze" with the .DN bit set, and will not accumulate any more time. Set the .PRE to 2,147,483,647 (maximum positive value of a DINT), which equates to 2,147,483 seconds, or just under 25 days of accumulated time.

The good thing about using RTO is that it will hold the accumulator value, not just when it is disabled, but also through power-cycles, and mode changes (RUN-PROG-RUN) of the controller, that is why it is called a "Retentive" timer.
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem



Last edited by daba; February 8th, 2018 at 04:48 AM. Reason: speeling
  Reply With Quote
Old February 8th, 2018, 10:38 AM   #5
backendcode
Member
Canada

backendcode is offline
 
Join Date: Aug 2017
Location: brampton
Posts: 240
Quote:
Originally Posted by daba View Post
It is just RTO - not RTON.

It works exactly the same as a TON, except that it doesn't automatically reset when disabled. To reset it, use the RES instruction, with the timer tag name as the parameter.

It sounds like you don't ever want it to "time-out", because if it did it would just "freeze" with the .DN bit set, and will not accumulate any more time. Set the .PRE to 2,147,483,647 (maximum positive value of a DINT), which equates to 2,147,483 seconds, or just under 25 days of accumulated time.

The good thing about using RTO is that it will hold the accumulator value, not just when it is disabled, but also through power-cycles, and mode changes (RUN-PROG-RUN) of the controller, that is why it is called a "Retentive" timer.
Thank you for the explanation! Much appreciated and I finished the logic and its working good so far

Thank you again for the help
__________________
Junior Control Engineer
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
What can i do to get better at coding controls logics? Jrivers010 LIVE PLC Questions And Answers 54 August 23rd, 2017 05:08 PM
Direct Logic H2-CTRIO help please Tubularfab LIVE PLC Questions And Answers 18 June 5th, 2012 03:44 PM
How can i implement the logic jcp LIVE PLC Questions And Answers 11 October 11th, 2011 07:30 AM
Ladder Logic, Line-by-Line, Flowcharting recondaddy LIVE PLC Questions And Answers 10 March 18th, 2010 10:39 PM
Motor control programs in laddar logic richie LIVE PLC Questions And Answers 7 August 18th, 2005 09:26 PM


All times are GMT -5. The time now is 06:59 PM.


.