Sign in to follow this  
Followers 0
popquiz

I need to toggle an output with only 4 instructions

8 posts in this topic

I have a busy DL05 application with available ladder memory limited to just four more instructions, five including the "END" instruction. I need to toggle Y5 on and off with one remaining unused input. Any suggestions?

Share this post


Link to post
Share on other sites
Good luck with your homework....your smart you will figure it out..

Share this post


Link to post
Share on other sites
This is a pretty standard tech school quiz question. To answer it for you, would help you learn nothing. If you insist on finding the answer rather than attempting it yourself first, a search of mrplc should show you some answers to this.

Share this post


Link to post
Share on other sites
I did go to Allen Bradley's PLC2 school once upon a time. I've searched the web and most toggle logic requires 7 instructions. Of coarse there is the IBox (PONOFF), but really, how many layers of abstraction do we need? I came up with: STRPD X0 LD K1 SUB V40500 OUT V40500 ->but this means you can ONLY use output Y0. I suppose you could use some internal word from some remote quadrant of the control relay bit map in place of V40500 and then slave any real world output you like, but now your code contains 6 instructions. 6 < 7, but I seek 4. Edited by popquiz

Share this post


Link to post
Share on other sites
I see. So the final answer is: STRPD X7 LD K20 XOR V40500 OUT V40500 And if I wanted to toggle all the odd outputs Y0 thru Y15: STRPD X0 LD KAAAA XOR V40500 OUT V40500 And if I replace X0 with a sequence of T0 accumulated values, I'd have a DRUM. I think we're going to have some fancy Christmas decorations this year! Thank you bcarlton Edited by popquiz

Share this post


Link to post
Share on other sites
If when you test this on an actual PLC you can't figure out why, what you posted, doesn't quite work out the way you thought it would think about how often this code is executing.

Share this post


Link to post
Share on other sites
Oh that's right. I wired up and ran the code in post #4 a few days ago. It didn't work before I changed STR to STRPD. I'll edit my previous posts. Thanks again. Edited by popquiz

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