Sign in to follow this  
Followers 0
khiraly

IF-ELSE in ladder program

9 posts in this topic

Hi! My problem is really simple: I have a timer relay which switch on 5sec and off 5sec. When the timer is on I want to move some words in the memory. Like this: t_on: copy once D3200 to D3100 (copy one word) t_off: do nothing t_on: copy once D3210 to D3100 (copy one word) t_off: do nothing t_on: copy once D3200 to D3100 (copy one word) t_off: do nothing t_on: copy once D3210 to D3100 (copy one word) t_off: do nothing and so on ... I have written a simple program, you can look at here: I have multiple problem with this: 1. it does not run correctly. Always the P_NE is executed. 2. I want to eliminate the UP contact I would really thanks for any hint! Im really stuck with it. I think this problem is so simple, that I must overlook something really basic. Thank you in advance! Edited by khiraly

Share this post


Link to post
Share on other sites
Or even this!! As you can see there are many methods of achieving the same thing. Example2.cxp

Share this post


Link to post
Share on other sites
I cant open you third file. The CX programmer only say that Could not open file ...\Example2.cxp The first two opened without any hiccup. Thank you, I examinate it right now! The second looks more interesting. Wouls you mind to attache one more time your third example? (or a screenshot of it)

Share this post


Link to post
Share on other sites
Here it is again. Good luck. Reposted the Example2. Original was for a CP1L processor. This one is for a CJ1M. Maybe you do not have the latest PLC drivers? Example2.cxp Edited by BITS N BYTES

Share this post


Link to post
Share on other sites
Thank you very much, I successfully used your example program in my program. Thank you!

Share this post


Link to post
Share on other sites
HI, I need a similar logic to be implied for my case. I need to read a digital IO value (say 1.02). If its true, I would like to set a data value (say D20) as 1. If its false, I need to set it 0. I am using OMRON CJ2M CPU 13. Thanks KB

Share this post


Link to post
Share on other sites
________ ---| |------- | MOV(21)| 1.02 | &1 | | D20 | |________| ________ ---|/|------- | MOV(21)| 1.02 | &0 | | D20 | |________|

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