Sign in to follow this  
Followers 0
Guest Guest_John Grizia

Small Rutine

2 posts in this topic

I need to write a small rutine to operate 6 outputs on and off starting from 1 to 6 with a single imput push button. like xo yo on xo yo off xo y1 on xo y1 off ect.ect please I can understand statement language and ladder Structured language minds nothing in my poor brain Thanks. John

Share this post


Link to post
Share on other sites
i'm not sure what could this be used for but this is simpe code that should do what you are asking for: ld x0 pls m0 ; create pulse ld m0 inc d0 ; and use it to increment counter ld>= d0 k12 mov k0 d0 ; ensure counter rollover ld= d0 k1 out y0 ; on first pulse turn y0 ON etc. ld= d0 k3 out y1 ld= d0 k5 out y2 ld= d0 k7 out y3 ld= d0 k9 out y4 ld= d0 k11 out y5 panic mode

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