Select one of Multiple Inputs AD DL240

keithkyll

Member
Join Date
Jul 2005
Location
Heath, TX
Posts
2,033
Original system has one pump and 26 hoppers. Each hopper has a Full switch. Only one input was used on the PLC for the Full switch. Operator connected pump hose to a particular hopper, then set a rotary switch to the proper unit. This switch wired the associated Full switch the the single PLC input.
Now upgrading, with all 26 inputs wired to PLC. Rotary switch will be on touchscreen.
I know how to do this with 26 rungs of logic. Is there a simple way to compare the status of the input register with the BCD number from the HMI?
DL240 CPU, 16 channel AC input cards.
 
If the selector from the touchscreen is a number (0 - 31) then LD it into the accumulator, do a DECO then OUTD to some set of C bits like VC20. This will set the bit offset by the number. To explain if 5 were slected on the screen then C25 in this example would be on. AND each bit with a specific input.
 
Try this out. Create a blank 240 project and import the txt file I attached.

You will need to change the registers and bit addresses to match your installation.

V2000 is your BCD rotary switch HMI register. VX0 is the word address for the first 16 input card (if your tank full indications are not located on the first 16 input card, we need to change things.) Likewise, VX20 is the second 16 input card. I am assuming tank 1 is wired to input 0 on the first card and so on in logical order.

We need to do the comparison in two steps as the 240 CPU does not support ANDing 32 variable bits at a time. I OR the two readouts into a final 'tank full' indication.

If you have any questions, or if something is broken, post up.

Brian
 
There is the ANDD instruction at least in the DL06.

Sorry - missed the '240' - it only allows a constant as an argument.
 
Last edited:
Bernie, I read somewhere that the DL06 was a stripped down version of the DL260, making it smarter than DL230, etc.

Brian, that worked great. Plug and Play with documentation too. Thank you! Needed it 4 times. Copy & paste, change addresses/docs and I'm done.

Notes for others:
Only thing is the 1 bit Human/Computer offset - Count is 0-31, leaving zero as the first unit. Only needed 26 of 32 channels. Leaving X0 as one the spares to keep code clean.
Habit is to skip odd addresses (use V2000, V2002, etc.) to keep Bernie's 32 bit option open.
 
Installed and tested last week. One bug - Shift instruction is in decimal, not hex. SHFR should be K16, not K10.
Thanks again for the help.
 
Installed and tested last week. One bug - Shift instruction is in decimal, not hex. SHFR should be K16, not K10.
Thanks again for the help.

That's odd... The manual clearly shows a KA in the instruction and says the instruction will shift the bit pattern 10 positions. You can't even enter KA as an argument for SHFL or SHFR!

Hopefully AD will notice the thread and update their manual.

Brian
 
Am I looking at this right? It works with K16.
The input cards are 16 channel. That means we want to shift 16 positions to look at the next card. Right?
 

Similar Topics

Hey I have a recipe edit page where i need to translate multiple numbers into text. The window contains a recipe in the background with the...
Replies
2
Views
1,796
Hi Guys, I have a little project in which I have 4 tanks with level transmitters installed. There is a recycle pump that will start/stop based...
Replies
11
Views
2,509
Im trying to install a Siemens upgrade license using Automation License Manager v6.0. I clicked D: mistakedly, and now I can not find a way to...
Replies
2
Views
43
Hello, We recently upgraded our control server to a newer model. After the transition we are experiencing issues with our trend graphs to where...
Replies
2
Views
120
Hi all, I really need help with this one. I'm at a complete loss... For months and months, I've had no problems with pressing a NEXT button to...
Replies
14
Views
1,443
Back
Top Bottom