Sign in to follow this  
Followers 0
lonegator

TON Help

3 posts in this topic

Can someone look over the attached line of logic and let me know what I have wrong? The TON's .DN bit never sets and the timer just continues over and over again. Thanks!

Share this post


Link to post
Share on other sites
In the ladder you posted, the done bit will be set for exactly one scan and will reset the timer, and it will start timing again on the next scan. What is you desired outcome?

Share this post


Link to post
Share on other sites
This is a classic example of a free running timer. This is a "TON" (timer on delay). Here is a detailed description of exactly how it works. During prescan (on power up or going from program to run mode), the timer gets cleared since TON is one of the few non-retentive functions. Whenever the input conditions are false, the timer ACC, TT, and DN bits clear. Whenever the input conditions are true, the timer TT bit is set. If the timer DN bit is true, the timer does nothing else. If the ACC value equals or exceeds the PRE value, then the DN bit is set. If the DN bit is clear, then it increments the ACC value based on an internal system timer which takes into account scan time. OK, so taking your particular case into account, so long as your input conditions are true, the accumulator accumulates. On the scan where the accumulator equals or exceeds the preset value, then the DN bit gets set. On the NEXT scan, the DN bit is set which makes the rung go false...which then resets the timer. It's not really "constantly running". It runs for the preset time, stops for one scan (and clears), and then begins counting again. If your intention is to get it to stop when it reaches the PREset condition, then get rid of the XIO DFF_ON_TMR.DN condition. Then it stops with the DN bit set and remains that way until the remaining input conditions go false.

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