Sign in to follow this  
Followers 0
gorichan

How to 'count up' timer

11 posts in this topic

Hello guys Help me. How to make timer in Cx-Programmer to count up? TQ.

Share this post


Link to post
Share on other sites
Use CNTR function.

Share this post


Link to post
Share on other sites
Why do you need to count up? So you can see elapsed time? There are many ways to skin a kangaroo.....

Share this post


Link to post
Share on other sites
I would not use a CNTR function... it is not a direct equiv to an AB CTU instruction if that is wha you are looking for. I would use a @INC or in a CJ @++ instruction and do comparisons accordingly. Check out a previous thread http://forums.mrplc.com/index.php?showtopic=2465&hl=cntr

Share this post


Link to post
Share on other sites
CNTR works, so does @INC. If the guy is new to Omron CNTR may be a bit easier that's all.

Share this post


Link to post
Share on other sites
Thanks! I have tried CNTR and it works! In CNTR, it will count up between zero and SV. But 1 thing, I tried and found out that the highest SV it can reach is #9999. Is there any way to go beyond that value? Ill try to count up using INC command as well to see which one is better.

Share this post


Link to post
Share on other sites
yerp! using INC also can. But INC command increments BCD data type. How I want to make INC command to increment # data type?

Share this post


Link to post
Share on other sites
Generally speaking, the older Omron PLCs are BCD based. If you have a CJ1 or CS1, you can turn all the timers and countewrs into binary (decimal) based but they all have to go that way. By the way, # is BCD, decimal is &. Edited by BobB

Share this post


Link to post
Share on other sites
Hello gorichan, If you are using a CS / CJ PLC, you can use "++" (Binary Increment - 0 to 65535). Also, as BobB says, switch the timers and counters to Binary (that'll give you 0 - 65535). To do this, go to PLC Properties, and select the checkbox option. Hope this helps Regards anonymous

Share this post


Link to post
Share on other sites
Bobb CNTR works..... Well he better be aware of it limitations as I found out the hard way. From a previous topic

Share this post


Link to post
Share on other sites
Thanks guys!! Found them really² helpful!. I managed to count up timer in about 2 weeks ago but forgot to say thank you. So once again Thank You!! I get my project done! yeah~

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