PLC5 Timer

jiaoji

Guest
J
Hi,u

Is there any one can tell me what " T4:0/6 " means,

I upload it from PLC,my rslogix reports error when I verify the rung.
I am wondering if it's just T4:0.acc/6
 
Is there any one can tell me what " T4:0/6 " means

This is copied from the online help, it's for a TON

Use the TON instruction to turn an output on or off after the timer has been on for a preset time interval. This output instruction begins timing (at either one second or one hundredth of a second intervals) when its rung goes "true." It waits the specified amount of time (as set in the PRESET), keeps track of the accumulated intervals which have occurred (ACCUM), and sets the DN (done) bit when the ACCUM (accumulated) time equals the PRESET time.
As long as rung conditions remain true, the timer adjusts its accumulated value (ACC) each evaluation until it reaches the preset value (PRE). The accumulated value is reset when rung conditions go false, regardless of whether the timer has timed out.

Instruction bits: 13 = DN (done)
14 = TT (timer timing bit)
15 = EN (enable bit)
If power is lost while a TON is timing but has not reached its preset value, the EN, and TT bits remain set , and the accumulated value (ACCUM) remains the same. This is also true if the processor changes from the REM Run or REM Test mode to the REM Program mode.
If either the Accumulator or the Preset is negative when the TON instruction is executed on a true rung, a Major Fault (0034) is generated.

Note If the rung goes "false" (loses logical continuity) during the timing process, the accumulated value is reset, and the DN, EN, and TT bits all reset whether or not the timer has reached the PRESET value.
Warning! Timing could be inaccurate if JMP, LBL, JSR, or SBR instructions skip over the rung containing a timer instruction while the timer is timing.

Addressing Help

Enter a TIMER address, TIME BASE, PRESET value, and ACCUM (accumulated) value. Timer files use three words per element, one for instruction bits (the control word), one for the preset, and one for the accumulator.
T4:1 represents timer file number 4, element number 1.

Rockwell Software 2000
 
Very interesting...

According to my old copy of PLC-5 Instruction Set Reference, the only bits that are defined for us normal folks in the control word are 13 DN, 14 TT, and 15 EN. Note that if you type T4:0/13, RSLogix happily changes it to T4:0/DN.

However, if you call up the T4 file and click on the base column, it reports that the address is T4:0/9. It's not very useful, but it is interesting.

My guess is that older 6200 or AI5 software may have accepted T4:0/6. Since my current software won't even let me look at that address, figuring out what it does is a bit difficult.
 
mellis said:
Since my current software won't even let me look at that address, figuring out what it does is a bit difficult.
You should be able to see this indirectly by MOV'ing or COP'ing the timer address to a series of three N file addresses - as in:
MOV T4:0 N10:0.

IIRC, N10:0 thru N10:2 will then hold: CTL (where the EN,DN, etc. bits live), PRE, and ACC respectively.

I'll check this on a PLC-5 tonight.
 
TONs unmasked.

When you check it out, what you'll find is that the first 7 bits of the control word are used to keep track of the number of 10 msec that have elapsed since the TON was last scanned.

Ron Beaufort and I did a study of the TON block some time back. I forget entirely, but I believe that some aspect of the Real-Time-Clock is stored there, and used to determine when it's necessary to increment the .ACC value, and to prevent errors from propegating when the scan time is erratic, or simply not an simple fraction of the base time.

The /6 bit doesn't really do anything useful - it just indicates that 1280 msec has elapsed since the last TON update. The PLC should, of course, change that to 280 msec, and increment the .ACC by 1 when the TON is scanned (assuming a 0.01 time base).

The bit should never be set until after the TON is scanned (which will update the first 7 bits), but if it is set, scanning the TOM will reset it.


If you're really interested in what's going on, check out the
TON TIMERS Thread and the RESETTING TIMERS Thread
Therefore, that bit should never be set (when read by an -| |- instruction at least). Therefore, it acts as an ALWAYS_OFF bit.

Something else that I discovered: While the /9 bit is an indication of the time base (set = 1.0 timebase), altering that bit (using methods such as Doug lays out) DOES NOT alter the time base (at least on a SLC). The TON instuction itself maintains the timebase, and the bit is only used for RSLogix.

Unfortunately, this bit is also not available for programming, at least by RSLogix. I'm inclined to agree with mellis: it was an old copy of 6200 or AI that allowed that address.

If you are really interested in the inner workings of TON instructions, you may want to look at THIS THREAD and THIS THREAD
 
Last edited:
Just for the record, a sample instruction would be: COP #T4:0 #N7:30 3. The timer words are brought over in the order stated in my previous post.
 

Similar Topics

Hi all, I tried to test the watchdog timer in PLC5-20/E. When I set watchdog timer to 0, CPU still running. Does watchdog time has the low limit...
Replies
4
Views
3,024
I am using the following formula and I am getting error, Invalid Expression - too many closing parenthesis. when i copy the formula to notepad or...
Replies
4
Views
167
Preface: Kinda long, so I made section titles Intro: I just want to see if anyone here has seen anything similar. A PLC5-40 series C enhanced...
Replies
3
Views
385
Hi, can anyone help me get a pdf file for this RSP files. They are from a PLC5. Thanks
Replies
5
Views
539
Back
Top Bottom