PLC : keyboard to 4 inputs

flurk

Guest
F
hi, i have a little problem. I am making an alarm. And I need to make a 10 digit keyboard to (de)activate the alarm. But i only want to use 4 inputs (because I am running short of them) so I thaught to do it with a multiplexer, but my teacher wants me to do it in the program. Can anyone help.
 
How many digits you want to your password.?
If you have X digits in your password you need X+1 inputs
for Enter and for Clear.
Leave the rest as no use button.
That the way my car alarm work.
 
it is a 4 digit code, but if you use a wrong code 4 times, the alarm should go off. so I need the other digits as well. Also I would use a counter, to see if you entered 4 digits, when you have entered 4 digits, it automaticly checks if the code is correct. If it 's correct, it jumps to another function. If not, an you have 3 maare tries.
 
Try this. It's a little unorthodox, but should get the job done if your professor allows it.

Say you want your code to be 8417. So connect the "8" button to input 1, the "4" button to input 2, the "1" button to input 3, and the "7" button to input 4. Here's the unorthodox part. Connect all remaining buttons to ALL 4 of the above used inputs (I'd jumper all these buttons together and have just one wire going to the inputs). Now you just have to program the PLC to look for inputs 1, 2, 3, and 4 in that order. If it sees them in the wrong order OR it sees them all at the same time, it's the wrong code.
 
Just to check the obvious...

Has no one heard of BCD? The numbers 1 to 10 are represented by 4 discrete inputs.

As for the programming, that's just a simple sequencer. Pick your favorite (I'd probably use the Latched-bit one, shown HERE.

The only other piece you might want is a very slight time delay to allow the BCD inputs to all be scanned when there is a non-zero number in any input.
 
Maybe we need more info from flurk. I was assuming if a multiplexer was not allowed, and if his professor wants it done "in the program", that a BCD converter would also be out of the question, but I could be mistaken. That would definitely be a better way to go if it's allowed.
 
I'm not sure that BCD would right for this application. Flurk will need a way to distinguish between zero and 'no key pressed'. Still, four input signals are enough to encode ten different digits.

Flurk will need ladder logic to detect a keypress. This could be simply monitoring the inputs for a change from the 'no key pressed' state. As each keypress is detected bump a counter to track the number of keypresses. Then compute (First digit * 1000) + (Second digit * 100) + (Third digit * 10) + (Fourth digit). Compare the result against the stored password, and 'open sesame' (or open the trapdoor underneath the unlucky guy that tries to enter the wrong code).
 
Interpreting the 4 inputs as a binary number is certainly going to be the easiest way to determine which keys have been pressed.

However, Googling around, I couldn't find a 10 digit keypad which had a binary 4 bit output. Most of them had 8 pins; (a few had 10). And yes, you can use a BCD decoder but you'd have to mess around with voltages if you did.

So, how might you do it using standard push buttons?

I don't know how practical it would be, but this is what I came up with:
[attachment]
This would normally have all 4 inputs on (decimal 15) and whenever a single button is pressed, the binary representation for that button would be input.

Anthony

10 to 4 input.jpg
 

Similar Topics

Has anyone ever connect a keyboard directly to a PLC for data entry? I have an application where I want to use an industrial keyboard to directly...
Replies
18
Views
10,845
F
HI, I am doing a little project where I transformed 10 inputs to 4 inputs binair with a multiplexer. Now I want to connect those 4 inputs to my...
Replies
1
Views
2,324
Hello, I have an automation direct d2 262 plc and C-more HMI EA9T6CL-R. I need to prepare a program, scheduled to be performed on a future date. I...
Replies
0
Views
1
Hello, I'm trying to delve a little into rs-485 communications for a couple projects of mine. Until now I've been using a delta vfd and a delta...
Replies
2
Views
38
Greetings All, I recently decided to start freelancing in Controls and Automation part time, most of my experience has been with Rockwell...
Replies
2
Views
85
Back
Top Bottom