Sign in to follow this  
Followers 0
Guest yan

counter & timer

4 posts in this topic

to all the experts out there, i'm new to omron plc. i notice that the counter and timer are counting in descending manner. anyway to make the counter and timer counting from zero? i use touchscreen to show both counter and timer and i found it tedious to subtract the counting value with the set value before displaying them. how to add a number in double word? i need to show a figure of production for the whole day. the figure might go up to millions. i need double words. how do i specify a double word in the instruction? only DM available. i'm so confius with the instruction. bcd, hex, dec all mixed up. please help thanks

Share this post


Link to post
Share on other sites
Hi Yan, You did not say what PLC you are using, or what software you are using to program. The information below is for a CJ1M PLC using CX-Programmer V5.0 to program. First, if you want to make an incrementing counter, just use the CNTR command. The CNTR is a reversible counter, meaning that you can count both up and down depending on what you want to do. One note, the limiting value of this is 9999, so if you wanted to count higher, you could use a compare (CMP) function to count the number of CNTR's, then multiply them at the end (or in your touch screen) to get your useable data. As for adding numbers in double word, for the most part, you use the same commands that you would for smaller numbers, but with the addition of an "L" at the end. For example, if you wanted to set a double word, you could use the MOVL command. If you wanted to increment that number by one, you could use the ++L command. I hope that helps you out. Tig

Share this post


Link to post
Share on other sites
Hello, It is possible (for CJ1M and all CS/CJ - H series PLCs) to execute TIM and CNT as binary. Use TIMX, CNTX, TTMX, CNTRX etc. This will give you a range of 0 - 65535. This mode is set via the PLC properties. Right click the PLC, select Properties from the pop-up menu...
1 person likes this

Share this post


Link to post
Share on other sites
thanks a lot. i'm using cx-programmer and cpm2a plc. i've tried to refer the help file but the explaination is not in detail. thanks.

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