Help - Search - Members - Calendar
Full Version: I need to toggle an output with only 4 instructions
Forums.MrPLC.com > PLCs and Supporting Devices > Automation Direct
popquiz
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?
ReBroker
Good luck with your homework....your smart you will figure it out.. thumbsupsmileyanim.gif
BobLfoot
QUOTE(popquiz @ Mar 17 2009, 08:45 PM) [snapback]80036[/snapback]

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?

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.
popquiz
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.
b_carlton
XOR
popquiz
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
b_carlton
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.
popquiz
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.