keypad ladder logic - Collyd21

Thread Starter

strantor

Joined Oct 3, 2010
6,342
This post was sent to my inbox. I am glad to help, but I would prefer to have it go through the proper channels, such as a thread like this one. This way everybody, from now until infinity can refer to it as a matter of public record instead of it being locked away in 2 people's inboxes.
collyd21 said:
hi strantor,
i was reading a thread you posted in about using a keypad with plc. can you please give me an example of ladder logic diagram of how a keypad code will bring on an output. Example, if i enter code 001 and then press # button light 1 will be on, if i enter code 215 and press # light 2 will turn on. also how do i go about resetting the code as in if i want to enter 201 but enter 202 by mistake how do i cancel the inputed code so i can start fresh? any help here would be great thanks

collyd21
Can you give a part number for your keypad and tell what PLC software you're using?
 

Thread Starter

strantor

Joined Oct 3, 2010
6,342
BTW I wouldn't be able to reply to your message anyway because you have elected not to receive mail:
The following errors occurred with your submission:
collyd21 has chosen not to receive private messages or may not be allowed to receive private messages. Therefore you may not send your message to him/her.

If you are trying to send this message to multiple recipients, remove collyd21 from the recipient list and send the message again.
 

collyd21

Joined Jul 2, 2012
14
Sorry about that newbie on this forum. Thanks for sharing my question it'll be good to get views of any other interested members. Any suggestions as to how I would go about solving the problem I have? Thanks
 

Thread Starter

strantor

Joined Oct 3, 2010
6,342
HUH? To my knowledge you can't program a Mitsu PLC with RSLogix. Mitsu has their own proprietary software called GX Developer. And it's a PITA to use. RSLogix is exclusively for Allen Bradley PLCs (as far as I know)
 

Thread Starter

strantor

Joined Oct 3, 2010
6,342
crap man, I'm really not going to be able to give you specific instructions. I totally suck with GX developer. I bought it to make one small change in one PLC and that took me a whole day to figure out. I've never used it since. I hate it.

But in any case, generally, I think (read, not sure) you could do it by utilizing sinking and sourcing inputs. for example connect your keypad pins to your PLC inputs like so:
Rich (BB code):
PLC input              Keypd pin
sinking input I:1.0  - pin 3
sinking input I:1.1  - pin 1
sinking input I:1.2  - pin 5
sourcing input I:2.0 - pin 2
sourcing input I:2.1 - pin 7
sourcing input I:2.2 - pin 6
sourcing input I:2.3 - pin 4
that way, when any one key is pressed, 2 inputs are made. For example, you press # 5, pins 7 & 1 are connected, so current will flow from input I:2.1 to I:1.1 and you can set up a ladder instruction to recognize that as a "5".
 

collyd21

Joined Jul 2, 2012
14
I understand how to let it recognise each key, I'm stuck on the part of entering a code on numbers to turn on an output, eh 201# turn on output 1 etc
 

Thread Starter

strantor

Joined Oct 3, 2010
6,342
ok this is how I would do it: setup bits for each key,as I described. Let's say you make a rung for the number 5,
Rich (BB code):
(I1.1, NO)----(I2.1, NO)-----------------(B0.5, coil, latch)
you do this for all the keypad numbers, so you end up with B0.0-B0.8 (just going up to 8 for example) representing keypad numbers 0-8. make these latching.
make a timer (maybe 5sec) that when it counts down, all bits are unlatched

Rich (BB code):
(T0.0/DN, NO)----------------┬------------(B0.0, coil, unlatch)
                             ├------------(B0.1, coil, unlatch)
                             ├------------(B0.2, coil, unlatch)
                             ├------------(B0.3, coil, unlatch)
                             ├------------(B0.4, coil, unlatch)
                             ├------------(B0.5, coil, unlatch)
                             ├------------(B0.6, coil, unlatch)
                             ├------------(B0.7, coil, unlatch)
                             └------------(B0.8, coil, unlatch)
.
have each keypress reset the timer.
Rich (BB code):
(B0.0, NO)-------┬-----------------(T0.0, coil, reset)
(B0.1, NO)-------┤
(B0.2, NO)-------┤
(B0.3, NO)-------┤
(B0.4, NO)-------┤
(B0.5, NO)-------┤
(B0.6, NO)-------┤
(B0.7, NO)-------┤
(B0.8, NO)-------┘


Now, to establish your code, just put your 3 numbers in a series rung
Rich (BB code):
(B0.2, NO)------(B0.0, NO)------(B0.1, NO)------------(O0.0, coil, relay output)
but what if someone just pushes ALL the buttons? It will energize the output. so we need to include all the other numbers as NC contacts
Rich (BB code):
(B0.2, NO)---(B0.0, NO)---(B0.1, NO)---(B0.3, NC)---(B0.4, NC)---(B0.5, NC)---(B0.6, NC)---(B0.7, NC)---(B0.8, NC)---------(O0.0, coil, relay output)
 

Thread Starter

strantor

Joined Oct 3, 2010
6,342
hmmmm except that would allow codes of 210,012,021,102,120 as well. I'll come up with something else and post again later. I'll be busy today.
 
Top