Guest Guest_John Grizia Posted November 20, 2002 Report Posted November 20, 2002 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
panic mode Posted November 21, 2002 Report Posted November 21, 2002 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now