Sign in to follow this  
Followers 0
gaz_chadwick

Logix5000

11 posts in this topic

Hi all, I need some help with Logix5000, I'm a Siemens man and not really used Rockwell. I would like to know if there's a timer instruction that will count from a preset value down to 0. Basically a time remaining system, I'm fine with converting in to ms and back to hour/ mins just need to know the best / easiest way in Logix5000

Share this post


Link to post
Share on other sites
TON Just create a tag of the data type timer so it has a place to live. I usually create an array if I'm going to have more than one timer in a program, which is pretty much all programs for me so create a tag called Timers of the data type Timers[16], where 16 is the number of timer tags, and use Timer[0], Timer[1], etc in the TON. TON can be put in ladder, FB (I think, never done one), and structured text. It's up in the Element Group under Timer/Counter. Just above the ladder editor (or FB or STL)

Share this post


Link to post
Share on other sites
The accumulated value always counts up. Calculate (Preset - Accumulated Value). In some cases the Accumulated value goes past the preset so take whatever steps are needed for a zero time remaining display.

Share this post


Link to post
Share on other sites
There isn't, but you can create your personal Add-On Instruction (AOI) that does exactly what you want. Remember b_carlton's: "The accumulated value always counts up. Calculate (Preset - Accumulated Value). In some cases the Accumulated value goes past the preset so take whatever steps are needed for a zero time remaining display." Bye

Share this post


Link to post
Share on other sites
Oops, I misunderstood the question. I have a Time Remaining AOI that I built in a ladder. It's drag and drop. Zipped up and attached I need to convert that thing to Structured Text but it works so I just keep using it TMRM.zip

Share this post


Link to post
Share on other sites
I find it odd that some people use "Time Remaining" in their control code.... Most times a process has to be controlled by "Time Passed", e.g. something has been at a temperature for so long, pressure has been applied for xx minutes, the product has been aged, matured, stood, allowed to cool, etc. for xx hours or whatever. The measurement of "elapsed" time is generally what is required, so the notion of time being "increasing" is correct in my opinion. "Time Remaining" is usually just a display value, most often provided as a convenience for operators or supervisors, and is so easily derived with a quick calculation based on the preset and elapsed (accumulative) time. It would have been straightforward for Allen-Bradley to have implemented timers that "count down", and it would be straightforward to create AOIs to do so, but all they will be doing is that little bit of math - PRE-ACC

Share this post


Link to post
Share on other sites
I use the AOI once in each of the 50+ and counting PLC's that are in a large crude oil pipeline transportation system that I wrote the programs for. Some of the shutdowns in each station are required to be tested. Once the logic has been proven to do what it's supposed to do we can use a single shutdown bypass timer and an enable / disable bit for each shutdown on the list to allow the tech to trip the shutdown and annunciate the condition, put the process variable back in normal operation, reset the shutdown, and return to normal operation. I use a timer to prevent someone from forgetting that the bypass is enabled. If it times out, all shutdown functionality returns to normal. The testers (control center and technician) need to know how much time they have left before the test timer runs out so they can abort the test and reset in the event that something is taking longer than it should to test. So... time remaining is important Edited by Michael Lloyd

Share this post


Link to post
Share on other sites
Hi Gaz. Just make a timer instead TON then make a TOF timer. the tof is from your preset value down to zero.

Share this post


Link to post
Share on other sites
That statement is 100% WRONG !! All A-B timers, TON, TOF, and RTO "count up" from zero when timing.

Share this post


Link to post
Share on other sites
This has been answered, but I do this for override functions. I use the TON .DN bit to complete the override, but for display purposes on the HMI I show a 10 min countdown. All I do is use a subtraction block and subtract the TON.ACC value from the TON.PRE value, then use the destination tag as my display.

Share this post


Link to post
Share on other sites
All timers in Siemens, AB, Mitsubishi, etc. count from zero. The only goal of doing backward counting is for displaying in HMI, as Maf said. If you want to show a backward counting, say: 60 sec, 59 sec, 58 sec, etc. you have to create an integer tag to store the number of a calculation. TON.PRESET - TON.ACC

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0