12 key keypad to 8 bit input card

Nepiter

Member
Join Date
Apr 2010
Location
At job
Posts
79
Hi,

I am sort of newbie here..:oops:

Maybe someone could help me with my small project..
I have 8 bit input card ( and of course S7-317 cpu etc.)
Also i have storm interface 12-key keypad with 8 pins.
http://www.storm-interface.com/product_attachments/PLXSeries.pdf

I thought i could connect that keypad easily to my 8 bit input card, to activate each bit at each key press, but keypad contact matrix is making me dizy.. =)

Contact matrix is: key_number=pin+pin
1=1+3, 2=1+4, 3=1+5, 4=2+3, 5=2+4, 6=2+5, 7=8+3, 8=8+4, 9=8+5,
0=7+4, *=7+1, #=7+6

How an earth I can connect those contacts to 8 bit inputs to get something out from keypad..?
 
Contact matrix is: key_number=pin+pin
1=1+3, 2=1+4, 3=1+5, 4=2+3, 5=2+4, 6=2+5, 7=8+3, 8=8+4, 9=8+5,
0=7+4, *=7+1, #=7+6

Recheck the assignments for '*' and '#'
I see them as '*' = 7+3 and '#' as 7+5

In any case you'll have to use 3 outputs and 4 inputs (or vice versa) and some scanning logic.
 
Recheck the assignments for '*' and '#'
I see them as '*' = 7+3 and '#' as 7+5

In any case you'll have to use 3 outputs and 4 inputs (or vice versa) and some scanning logic.

Yes, You are right, thank You for correcting!
I studied contact matrix too fast..

3 outputs and 4 inputs are maybe solution for this.
It is worth of trying. Thank You!
 
Recheck the assignments for '*' and '#'
I see them as '*' = 7+3 and '#' as 7+5

In any case you'll have to use 3 outputs and 4 inputs (or vice versa) and some scanning logic.

I tought i figured out how to use 3 outputs and 4 inputs, to get cross reference for keypad, but no..
Any tips for easy scanning log?

I was just thinking if i use three different amplitudes for three outputs, and scan those amplituses from four inputs.
But of course, i cant get enough Herz from outputs to measure stabile amplitude while key is pressed.
Stupid idea.. :eek:

Of course I can write some rule near by keypad "press each key at least one second".. =)
 
part of the problem you will run into is that your going to need to trap the row inputs and the columm inputs. so set it up as thuogh you are using momentary contacts which these are.
 
Let's say the 3 outputs are tied to the column pins (3,4,5). Your logic turns them on one at a time. At each turn on delay a couple of scans then save the 4 inputs (possibly masking out any other inputs in that group which may be used for something else). Then switch to the next output. After the third output continue back with the first.

In other words it's a time sequence testing for the first column's switches, then the next column etc. If it's fast enough it will be the same effect as monitoring each switch continously.
 
Thank You for help!
The keypad problem seems to be solved with Your tips.

I set 'ON' three different outputs each at a time, 40ms cycles.
While each columns outputs are 'ON', I monitor inputs of each rows.

I still need to do some fine adjustments to prevent simultaneous inputs per cycle.
Anyway, now keypad is reading my four digit code without error 9 times of 10.

Thank You!
 
Last edited:
Remeber to do a slight delay after changing the output before attempting to read the input lines.

Good idea.. 20ms delay, and now it works like a dream.

Some background information:
I'm building a new house, and almost everything which work with electric, is controlled by Simatic 317 CPU.
This keypad is for door locks.
( But i believe, we still carry normal key with us at least couple of months.. =)
 
I like your method Bernie I was thinking more of latching the inputs, then moving the inputs to a data table then clearing after you complete the operation..course I seldom work on S7 If this were an SLC the SQL function would be an ideal application
 
I like your method Bernie I was thinking more of latching the inputs, then moving the inputs to a data table then clearing after you complete the operation..course I seldom work on S7 If this were an SLC the SQL function would be an ideal application

Yes, i'm also latching inputs, after each key press, to prevent simultaneous inputs.
After each key press, I block other inputs, and I move data to DB:s, and clear the table for second key press, and so on..

I'm sort of newbie with programming CPU:s this way, and My poor english might set some misunderstandings.
 
Yes, i'm also latching inputs, after each key press, to prevent simultaneous inputs.
After each key press, I block other inputs, and I move data to DB:s, and clear the table for second key press, and so on..

I'm sort of newbie with programming CPU:s this way, and My poor english might set some misunderstandings.

Would you be willing to share your ladder logic? I am trying to do the exact same thing now with the storm keypads and having trouble
 
I see it a little different
You don’t need any outputs to strobe on / off to read the keypad
I see that as prone to problems with timing issues
Just read the input word to the plc as a word value and decode from there.
I noticed the pin 6 is not connected but I think it is the + power to all the buttons.
The matrix would be, button press supplies + power to 2 matrix pins at the same time.
Wire the pins as follows
Pin # input
1 3
2 4
3 0
4 1
5 2
6 + Power
7 6
8 5

The Input word would be
Key Pins Word Value
1 3-1 9
2 4-1 10
3 5-1 12
4 3-2 17
5 4-2 18
6 5-2 20
7 3-8 33
8 4-8 34
9 5-8 36
0 4-7 66
* 3-7 65
# 5-7 68

So with key 1 pressed move 9 to the tag
Key 6 pressed move 20 to the tag
To assemble the receiver data to a usable number
The final keypad value tag Pad_value
Key I pressed Input value = 9 (Pad_value x 10 + 1)
Key 2 pressed input value = 10 (Pad_value x 10 + 2)
Key 3 pressed input value = 12 (Pad_value X 10 + 3)
The same with keys 4-0 \
Key * pressed input value = 65 (Clear Pad_value)
Key # pressed input value = 68 (Move Pad_value to working tag Clear Pad_value)
The reason to multiply the pat value by 10 is to shift to the left 1 character a the new key number can be placed on the right to form you number
Of course you can wire the keypad pins to any inputs you want just decode the binary values
 
I see it a little different [...]
I noticed the pin 6 is not connected but I think it is the + power to all the buttons.

Hmmm, there is nothing that says that in the brochure, and the 4- and 16-key keypads don't have such a pin (although the 4-key does calls its column connection a "common"). All three keypads' pinouts are in the same brochure; from that shouldn't we expect them to all operate in the same way?

Separate topic: my question is about the OP stating they have an "8-bit input card:" does such a card usually have a way to configure each channel for input or output? Or is there another card, for output, inferred? Thanks.
 
most keypads have a decoder chip set in them
it looks at rows and column's and the chip set gives you a digital output so you can use the data directly
I would think the keypad was not designed to be used as an output to a plc directly
I would like to see the full manual on the keypad something is missing
 

Similar Topics

I'm making a meal of this, my brain's not in gear. Also, I'm new to S7 TIA/WinCC so excuse my ignorance... See redacted pic. Pressing F7 (SAVE...
Replies
10
Views
3,171
On my HMI-1200, I'm trying to assign the image of a floppy disk ("save" icon) to a function key. I couldn't find one in the default drop-down...
Replies
5
Views
550
I am using the newest version of CCW Dev Software, and I am wondering if there is any way in which a tag could be added to a movement key (i.e...
Replies
1
Views
771
I am sure this has been discussed with no solution. But I need to unlock a program and do not have the source key. Is there anyway of unlocking...
Replies
3
Views
792
Hi, I found out that Allen Bradley had a key switch with a ejecting key function, the sensEject. But it is discontinued. I've failed to google...
Replies
10
Views
1,778
Back
Top Bottom