zach_zachary1@yahoo.com

Hard Coding TON s

4 posts in this topic

I am relatively new to programing.  In one of my plants programs the programmers use an MOV to hard code the TON accumulator.  What is the advantage of this?

 

 

Share this post


Link to post
Share on other sites

it fixes value so it cannot be changed acidentaly.

also it is a way to use timer in structured text..

Share this post


Link to post
Share on other sites

Notice that he wrote about MOVing a value to the ACCUMULATOR.

I've only seen this described once in creating a more accurate time source. With a preset of, let's say, 1 minute then, on the DN bit the expected preset was subtracted from the accumulator leaving whatever small amount over the preset had been loaded in evaluating the timer instruction. Thus the time between DN bits was,on the average, more accurate than just resetting the timer using a NC contact of the DN bit in the enable rung.

1 person likes this

Share this post


Link to post
Share on other sites

I have seen this, to give a certain  something time to happen. If that certain something happens before the timer times out then why wait. Write to the .ACC and make the timer time out.

Waiting for message instruction(s) to complete or give them time to complete is a good example.

Edited by Mickey

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