Sign in to follow this  
Followers 0
Mircea

Is something wrong with this counter?

12 posts in this topic

I've tried to make a counter and it does not working.Can somebody explain me why? I've attached a little .jpg file. Many thanks ! Edited by Mircea

Share this post


Link to post
Share on other sites
It looks ok as long as your 200.00 bit is on when the count goes high the counter should count. I would need to see more of the program in order to tell what is happening with the 200.00 bit and your count bit. one question why are you using a reversable counter. Edited by KinK

Share this post


Link to post
Share on other sites
This counter should start count only when 200.00 is ON. Concerning your 2nd question , it is a matter of choice. Thanks a lot! Edited by Mircea

Share this post


Link to post
Share on other sites
Sorry , for my english. I'm new in programming plc's and this is my first program.I participated of an Omron training course and since then I want to learn more and more about plc's , especially Omron.I work on a Windows 2K Professional platform with Syswin 3.41 installed on it. And that's all(for now...). I send the first part of the program. Edited by Mircea

Share this post


Link to post
Share on other sites
Hi. That type of entrance there is in 00.1?? alwais ON / Pulses. The CNT only workin by ascending side, that is to say when the entrance Passes from OFF to ON.

Share this post


Link to post
Share on other sites
The program you showed us will not work, meaning LR0.00 will never come on. Initially you set DM0 to #0000. DM1 is not initialized but lets assume it is #0000 to start with. CNTR000 will not execute because contact 200.00 is OFF. CMP will not execute because CNTR000 is OFF. When input 0.00 comes ON output 200.00 latches ON. Now the CNTR is enabled, Not ON. When input 0.01 comes ON CNTR immediatly turns ON because its current value is #0000 and it's SV (Set Value) is #0000 (the contents of DM0). It is not reset because LR0.00 has not been executed yet. Next Rung: CNTR is now ON. First thing that happens is DM1 is incremented (INC) by #0001. Next it is compared (CMP) to DM0. Their values are NOT equal so LR0.00 never comes ON and CNTR is never reset. Do you have a purpose for this code or is it just an exersize?

Share this post


Link to post
Share on other sites
It is and it isn't an exercise. I want this counter to count till 2 or 4 or 6... and to reset LR00.00 when the number of counts is reached. Edited by Mircea

Share this post


Link to post
Share on other sites
I as a matter of preference would not use the CNTR...... You have all the code already done... drop the CNTR and use the same instructions to fire the @INC DM0 command and use the CMP command to compare to any value you want and then as in your program if CMP is GT OR EQ then turn on LR0.00 and also use this to fire the initiailise bit in parrallel with the First Scan bit of MOV #0 DM0....

Share this post


Link to post
Share on other sites
Funny.... I was going to suggest the exact same thing. I just now got some time to assemble it.

Share this post


Link to post
Share on other sites
I checked up and it works ! Thank's a lot , Sleepy Wombat !

Share this post


Link to post
Share on other sites
Now , I want to check up the IO Rack's variant. Many thanks in advance IO Rack !

Share this post


Link to post
Share on other sites
No problem.....Sometimes its hard to see the forest through the trees !

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