keypad ladder logic - Collyd21

Discussion in 'General Electronics Chat' started by strantor, Jul 2, 2012.

  1. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    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.
    Can you give a part number for your keypad and tell what PLC software you're using?
     
  2. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    BTW I wouldn't be able to reply to your message anyway because you have elected not to receive mail:
     
  3. collyd21

    New Member

    Jul 2, 2012
    14
    2
    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
     
  4. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    .............
     
  5. collyd21

    New Member

    Jul 2, 2012
    14
    2
  6. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    I assume that's phone auto-correct or RSLogix?
     
  7. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    sorry, one more thing, what PLC and what input cards?
     
  8. collyd21

    New Member

    Jul 2, 2012
    14
    2
    Yes damn auto correct. Rslogix it is
     
  9. collyd21

    New Member

    Jul 2, 2012
    14
    2
    It's Mitsubishi fx1n
     
  10. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    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)
     
  11. collyd21

    New Member

    Jul 2, 2012
    14
    2
    My apologises, I was using a different computer at the time. It is gx developer sorry
     
  12. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    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:
    Code ( (Unknown Language)):
    1.  
    2. PLC input              Keypd pin
    3. sinking input I:1.0  - pin 3
    4. sinking input I:1.1  - pin 1
    5. sinking input I:1.2  - pin 5
    6. sourcing input I:2.0 - pin 2
    7. sourcing input I:2.1 - pin 7
    8. sourcing input I:2.2 - pin 6
    9. 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".
     
  13. collyd21

    New Member

    Jul 2, 2012
    14
    2
    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
     
  14. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    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,
    Code ( (Unknown Language)):
    1. (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

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


    Now, to establish your code, just put your 3 numbers in a series rung
    Code ( (Unknown Language)):
    1. (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
    Code ( (Unknown Language)):
    1. (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)
     
  15. strantor

    Thread Starter AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    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.
     
Loading...