Rslogix 5000 ton

kojoalmighty

Member
Join Date
Mar 2020
Location
toronto
Posts
7
How do i use the TON command to monitor the number of hours something stays on for? what would the preset value be in this case? Or is there another command that I should be using? I'm using RSLOGIX 5000 studio version 32. Thanks.
 
Last edited:
Since CLX timer presets are of the DINT type, the maximum preset value would be 2,147,483,647.

Since CLX timers operate with a mS timebase, that means that the maximum number of hours that can be accumulated in a timer is 35,791. (2,147,483,647 / 1000 / 60)

You may want to consider a different method for accumulating run-time hours if you want to log more than 35,791 hours. Perhaps a periodic task that operates once per minute and adds 1 to an accumulator register whenever the motor is running, then divide the value of that accumulator register by 60 to convert from minutes to hours.

There are many methods for tracking run-time, and the choice depends upon the required accuracy and maximum number of hours you desire to keep track of.
 
In Logix5000 processors, i always liked using the GSV function to monitor the system clock, and calculate an hour meter from that. You can use a oneshot to check when the last bit of the seconds goes from 0 to 1. That will mean 2 seconds has passed.
 
Since CLX timer presets are of the DINT type, the maximum preset value would be 2,147,483,647.

Since CLX timers operate with a mS timebase, that means that the maximum number of hours that can be accumulated in a timer is 35,791. (2,147,483,647 / 1000 / 60)

You may want to consider a different method for accumulating run-time hours if you want to log more than 35,791 hours. Perhaps a periodic task that operates once per minute and adds 1 to an accumulator register whenever the motor is running, then divide the value of that accumulator register by 60 to convert from minutes to hours.

There are many methods for tracking run-time, and the choice depends upon the required accuracy and maximum number of hours you desire to keep track of.
I think you missed a 60 in your division: 2,147,483,647 msec / 1000 msec/sec / 60 sec/min / 60 min/hr = 596.52 hours.

We do something similar with a one-second periodic task, counting seconds when the motor is running. When the count reaches 360 (0.1 hour), the program adds 1 to the DINT runtime and clears the count. The OIU or SCADA tag is scaled by 0.1 to display actual hours.

In Logix5000 processors, i always liked using the GSV function to monitor the system clock, and calculate an hour meter from that. You can use a oneshot to check when the last bit of the seconds goes from 0 to 1. That will mean 2 seconds has passed.
I've done that too, back when Version 13 redundancy only allowed continuous tasks.
 
Last edited:
I set up the RTO with a .PRE of 400000. Use the RTO instead of TON in order to not lose the time that is accumulated when the motor turns off.

When the .ACC is >= 360000 (6mins), I increment a DINT (HourMeter) and then subtract 360000 from the .ACC. This allows the time to continue running without losing any time and provides an hour meter that is in 1/10ths which is what most are used to seeing.
 
Keep it simple.

A RTO with a .pre of 3600000 will count hours, when .DN, use this to increment a CTU, when incremented, reset the RTO.
 
So many ways of killing this cat (excuse the analogy).


So many programs I have seen have totally ignored what happens if the processor restarts. Ordinary timers are reset, non-retentive output bits (OTE) are turned off, FAL and other "Controlled" instructions are reset, such a lot happens.....

Just forget TON, that loses its data if the processor is re-started. You have to use RTO.


You will use that timer to increment a counter, counting whatever time period you want to work with. It depends on your timebase, what do you need to know ? How many minutes the device has been active, how many hours, days, or even weeks.

Set the PRE to the appropriate value, then count how many times it has "timed_out" or .DN. Reset the timer, and count up the running time counter.


Simples ....
 
I set up the RTO with a .PRE of 400000. Use the RTO instead of TON in order to not lose the time that is accumulated when the motor turns off.

When the .ACC is >= 360000 (6mins), I increment a DINT (HourMeter) and then subtract 360000 from the .ACC. This allows the time to continue running without losing any time and provides an hour meter that is in 1/10ths which is what most are used to seeing.

I have been using this method since the PLC-5 days, works great.
 
Yes, many ways to do this.
My method as below. I put all my time calculations in a Periodic task of 1000ms. It gives results in Hh:Mm;Ss format

Time.JPG
 
I set up the RTO with a .PRE of 400000. Use the RTO instead of TON in order to not lose the time that is accumulated when the motor turns off.

When the .ACC is >= 360000 (6mins), I increment a DINT (HourMeter) and then subtract 360000 from the .ACC. This allows the time to continue running without losing any time and provides an hour meter that is in 1/10ths which is what most are used to seeing.

This is what I do, but I use a preset of 36 seconds and imply two decimal places so my long integer is hours to the 1/100th
 

Similar Topics

Hi, I'm just looking for a simple way to make a button in excel (via VBA I presume) to toggle a bit in RSLogix 5000. I just got FactoyTalkLinx...
Replies
9
Views
541
Hi, So I have one push button(non-latch momentary) and would like use it to trigger two function sequences with the short press for primary...
Replies
3
Views
1,979
How can I add the "Go To..." function to the RSLogix 5000's Standard Toolbar?
Replies
9
Views
3,569
Got into a bit of a debate the other day, and wanted to get some gurus' opinion/expertise on the subject. When duration of an output's ON (or...
Replies
9
Views
10,765
Hey, Can someone tell me what the default time base is for TON timers in RSLogix 5000? In the TON timer I don't see the option anywhere to edit...
Replies
9
Views
43,254
Back
Top Bottom