My first PLC question

bioplc

Member
Join Date
Jul 2005
Location
tampa
Posts
97
hello All,

i have recently started learning PLCs...doing my first sem of bachelors in electrical engineering from USF. well coming to the question

Recently i have come across a TON with Accum 10690, preset 30000, timebase 0.01

my question when TON is enabled, will it start accumulating from 10690+ 1 or 10690 + (current time- last time)???

why is programmer using 10690 for acc, why not 0 instead and (preset 30000-10690= 19310). Please help me with it.

thanks in advance,
Nick.
 
Which software package is the program for? Not all plc's will handle timers the same way. Once you let us know which brand you are using, we can answer your question a little bit better.

Welcome to the forum...

(also, you may want to re-post this question in the main forum instead of the "practice posting" section... Many people don't check the practice area for questions, so you get a much wider response from the main area)
 
Last edited:
Nick,
Tom is on the mark. It does help to know which brand and model of PLC. However based on your descriptions, I am 90% sure that you are talking about an Allen-Bradley program.

my question when TON is enabled, will it start accumulating from 10690+ 1 or 10690 + (current time- last time)???
If the program enables it with 10690 in the ACC value, then it will start timing at 10690. However, if the rung is FALSE at any point, the ACC gets reset to 0.

why is programmer using 10690 for acc, why not 0 instead and (preset 30000-10690= 19310). Please help me with it.
The programmer may not be, and more than likely IS NOT, using 10690 as the starting point. There are 4 ways this value can be saved as something other than 0, which is where the programmer would normally start the timer. I have never seen one start from anywhere other than 0, and I consider it poor programming practice to do otherwise.

For the Allen-Bradley RSLogix TON timer, when the rung logic goes from True to False, the timer Accumulated value is reset to 0.

Quote from AB TON Help screen: "The accumulated value is reset when rung conditions go false, regardless of whether the timer has timed out."

Therefore, normally the ACCumulated value should be 0, unless the timer is running on-line. There are several ways to get an ACC value other than 0 saved into the program. (1) Save the program while it is running, and upload the data tables, which will capture timer ACC values; (2) From another rung, move a value into the ACC bit while the timer is off, (3) Manually enter a value in the Timer Data Table ACC word, and (4) Switch the PLC from RUN mode to PROGRAM mode while the timer is running, which prevents the timer ACC value from resetting to 0.

The above 4 reasons are why it is sometimes a good idea to make sure that TON timer Accumulated values get reset to 0 somewhere in the program. Use the RES command to make sure that a timer gets reset to 0, if there is any doubt.
 
Last edited:
I suspect that you are looking at a copy that was uploaded while the timer is running.

Something I stress often to the PLC guys here when I'm training them: If possible, wait until the machine is in a safe state before doing an upload-save, because if you ever do have to resotre the program, you will be restoring it to the state it was in when you last saved it.
 
Alaric said:
I suspect that you are looking at a copy that was uploaded while the timer is running.

Something I stress often to the PLC guys here when I'm training them: If possible, wait until the machine is in a safe state before doing an upload-save, because if you ever do have to resotre the program, you will be restoring it to the state it was in when you last saved it.

Agree with Alaric here..specialy when you are on line with an AB processor (Clx)..It says..Tag value may have changed..would you like to upload them before saving..Most people wouldnt read into this but it is asking you you if you want the machine to start EXACTLY the same as it is now the time you download the program..(I figured this one out after about 3 shear pins !!! :)

D
 
thanks to all...

i have learned something today...and next time i will try to post it in Interactive Q & A.

Regards,
Nick.
 
darrenj said:
Agree with Alaric here..specialy when you are on line with an AB processor (Clx)..It says..Tag value may have changed..would you like to upload them before saving..Most people wouldnt read into this but it is asking you you if you want the machine to start EXACTLY the same as it is now the time you download the program..(I figured this one out after about 3 shear pins !!! :)

D

Darren, one of the things I try to code for is to makes sure a machine starts up in a neutral state, but you know how that goes, you try and try to account for everything, but there is always the possibility you missed something or some obsucre combination of things. Then there are the cases where you did not write the program and you are not 100% positive how it will behave if restored from backup. So while I belive that my programs can handle getting everything into the correct state after being restored, I sill consider it to be good practice to only do upload-saves when the machine is in a safe state. (and never ever switch to run mode unless all the fingers are out of the way)
 
Greetings Nick,



first of all, I’m not arguing with anything that’s been said so far ... but ... here’s one more take on it just to make sure that you understand exactly what’s being said here ... everything below assumes (gosh I hate that word) that we’re talking about an Allen-Bradley PLC-5 or SLC-500 platform ...



my question when TON is enabled, will it start accumulating from 10690+ 1 or 10690 + (current time- last time)???



answer: the TON will start accumulating from 0 ... even if the existing 10690 value was downloaded from a saved program into the processor, the TON would still start back up by accumulating from 0 ...



basic reason: to download a program into an Allen-Bradley PLC-5 or SLC-500 requires that the processor be placed in the “Program” or “Remote Program” mode ... specifically, the processor can NOT be left “Running” while a download takes place ... then at some time in the future, eventually the processor will be placed back into a “Run” (or “Remote Run”) mode ... as soon as that “go to run mode” happens, the processor will begin its operations by running one special pass through the program in what is known as the “Prescan” ... this is basically done for safety reasons ... one of the effects of the “Prescan” routine is to automatically “Reset” all TON timers ... specifically, the Accumulator is driven to 0 ... and all of the status bits (EN, DN, and TT) are placed in their 0 states ...



and so ... regardless of what “Accumulator” value happened to be saved in the program file, and regardless of what value happened to be downloaded into the “Accumulator” of the TON, the TON will always “start from scratch” (zero) when it begins running after a download operation ...



and going one step further, the rule that the TON will always “start from scratch” also holds true whenever the processor first goes into the “Run” mode for ANY reason (not just after a program download) ... because the “Prescan” takes place each and every time that the processor first starts “Running” ...



now ... as for RTO timers ... they’re a horse of a different color ... the “Prescan” doesn’t affect them in the same way ... and so their Accumulators can “pick back up right where they left off” ...



sorry if this is a little bit more information than you wanted ... but then again, you asked ... welcome to the forum ...
 

Similar Topics

HI i would like to know how to get a variable that will store the amount of times a program has been executed. The issue is I have 3 DBs for 1 FB...
Replies
2
Views
79
I've ready through the the previous posts, and we've worked with safety design for a long time. In the past, we worked with Pilz directly, and...
Replies
9
Views
563
Everyone, i am in the process of purchasing the Slc 500 version of software to support what we have and i have a question. Several of our...
Replies
9
Views
766
I know this can be done, but I can't get the router config right. My goal is to physically connect(using an ethernet cable) a device(PLC, RTU...
Replies
9
Views
1,019
Hello. Was just curious, if it is possible to load an image from an SD card on to a Compactlogix PLC that came straight out of the box brand new...
Replies
4
Views
545
Back
Top Bottom