RSL5000 TON Instruction help..

monet man

Member
Join Date
Sep 2011
Location
Michigan
Posts
20
Good day all. I am new to using CLX/RSL5K. I was having issues with getting my own version of a self-resetting timer to work, so after doing some research. I found a great solution for my purpose(s), but I cannot figure out why/how this works. I have had pencil/paper out figuring out states on every subsequent scans of this rung, and I don't know WHY this timer is never UN-enabled...or more specifically, why do I watch this program execute, and see the XIO (.DN bit) go open, but somehow resets itself. And then the TON re-enables itself. Not asking anyone to cover every clock cycle, but if anyone knows whats going on here, please enlighten me. Thanks..oh heres the rung..

selfRESETTINGton.JPG
 
sorry about that..i guess i'm just an all around newb. anyhow, i'll try to give my keyboard version of the rung..

TON.DN TON
----|/|-----------| |-----

..and that's all there is to it. The preset is 2000 ~ 2sec. When my program executes, the timer counts up, the enable goes low at some point, the done bit goes high, then the enable goes high, and the dn goes low again. Hence, I have a perpetual timer, and I cannot figure out why.
 
sorry about that..i guess i'm just an all around newb. anyhow, i'll try to give my keyboard version of the rung..

TON.DN TON
----|/|-----------| |-----

..and that's all there is to it. The preset is 2000 ~ 2sec. When my program executes, the timer counts up, the enable goes low at some point, the done bit goes high, then the enable goes high, and the dn goes low again. Hence, I have a perpetual timer, and I cannot figure out why.
Is this rung in the Main Task or do you have it in a Periodic task?
 
This is basically what is happening:

At first evaluation of the rung, the .DN bit will be 0, the timer starts timing
The timer accumulated value reaches 2000ms which will set the .DN bit to 1
The very next scan, the PLC will find that the .DN bit is a 1, which will reset the timer (since the rung will be false).
Once the accumulated value is reset, the .DN bit goes away and the process starts again.

BTW, I see your picture fine...
 
More timer (TON Only) info:

The .EN bit is on when the logic in front of it is true
The .TT bit is on when the timer is actually accumulating (timing)
The accumulated value resets (as well as the .DN) when the logic in front of the timer is false

If you read the help on the TON, it has some pretty useful information.
 
I think its working as its written. Self retting timer- the timer .DN XIO bit changes states for a very short while which you will not be able to see. Trend the .DN and .EN bits to see whats really happenning.
 
Using XIO Timer/DN as the only condition for a TON is the most common method I've seen of building a self-resetting timer. Here's my best attempt at explaining the mechanics of this set-up.

On the first scan obviously the timer is not done, so the XIO is true and the timer will begin timing. On each subsequent scan the logic will still be true and the timer will continue to accumulate until the accumulated value reaches the preset.

At the end of the scan where this occurs, the processor will update the timer status bits, one of which is the /DN bit, which will now be true/on/1. On the subsequent scan, when the processor reaches the TON rung, the logic will be read as FALSE since the /DN bit is ON, the XIO will be false. Therefore the the /EN bit will be reset to 0 which also resets the .ACC value. This also of course resets the /DN bit, so on the following scan, the XIO bit will again be true and the process begins itself anew.

Hope this helps.

Cheers,
Dustin
 
It's in the main program, bkottaras, not a subroutine.

Thanks dmroeder, I wasn't aware that the .DN bit was cleared automatically when the rung goes false. I know that since the timer isn't a RTO, it will lose the .ACC value upon going false. I didn't know that the .DN would be reset automatically as well. This piece of information wasn't covered in the 1756-RM003H-EN-P Instruction Set Manual. It covered the .ACC aspect when a rung goes false, but nothing on the .DN. Thanks again for the clarification on this.
 
This piece of information wasn't covered in the 1756-RM003H-EN-P Instruction Set Manual. It covered the .ACC aspect when a rung goes false, but nothing on the .DN. Thanks again for the clarification on this.

Well done, you already read it!

Since the .ACC is no longer greater or equal to the .PRE, the .DN is 0.
 
Now that you seem to understand how the TON works lets talk about what you are trying to do. You have named your timer tag LAMP_BLINK. Are you trying to flash a lamp at a periodic rate? If so then there are several ways to do this. In a CLX my preference would be to use a periodic task instead of a timer, but it can also be done with two timers, or with a single timer and a compare, or you can make the timer free running and use the tenth bit of the accumulator, LAMP_BLINK.ACC.10
 
agree with alaric
the ton reset it self in the 2 seconds.
when you willtake the trends then youwill find that whenever Accumulator began to count then the TT bit goes high also enable bit will high but when TT bit low then the dn bit high this dn bit will remain high till the input to the ton reseted as you are doing ,the only enablebit goes low some fraction on ms so it will not showing this.but
ifyou are doing blinking a led go to the logic of ALARic

TON CH.jpg
 
Last edited:

Similar Topics

I am using version V17.01.00 (CPR 9 SR 1) I have a fairly large machine with multiple PIO nodes on an ethernet network. I am getting a flashing...
Replies
0
Views
1,378
Hello, My coworker and I are commissioning a new panel. We have a 1732-AENTR series C remote IO thats Rev 6.1. The project file from a previous...
Replies
3
Views
1,610
Hello all. Yes, I remember well that RSL5k v.20 was plagued with issues however, it used to run on my laptop. After many years of hibernation I...
Replies
2
Views
1,555
Is there are way to set up RSLogix 5000 to start up with a category in the Controller Organizer 'minimized'? For instance, make the Add-On...
Replies
2
Views
1,726
Hello, I recently converted a control system from PLC-5 to ControLogix and have a question please. My discrete IO converted kind of weird and I...
Replies
2
Views
1,542
Back
Top Bottom