Question about keyboard for cnc build

More
29 Oct 2017 13:33 #100972 by Toolman321
Hello I’m building a controller for a small cnc mill, I have most of the parts I need apart from a suitable panel mount keyboard.
I have a denford desk top tutor keyboard I got with my machine, it’s connected via parallel port it originally used a 25 pin to 9 pin serial adaptor to connect it to the pc, and has changeable overlays, and would have originally been used with dos drivers to make it work. I’ve opened it up and it would make an excellent panel mount membrane style keyboard, with the added bonus I could make my own custom overlay with all the buttons I need.
I was wondering if it would be possible to Interface this keyboard and make it work with my linuxcnc system.
Many thanks
Lee
Attachments:

Please Log in or Create an account to join the conversation.

More
31 Oct 2017 13:00 #101054 by andypugh
All things are possible, but some are easier than others.

Do you know anything at all about the serial protocol used?

(And are you sure that it is a parallel to serial adaptor, and not just a Serial-25-pin to serial-9-pin adaptor? Back in the old days serial ports were 25 pin.)

Please Log in or Create an account to join the conversation.

More
31 Oct 2017 13:24 #101057 by Toolman321

All things are possible, but some are easier than others.

Do you know anything at all about the serial protocol used?

(And are you sure that it is a parallel to serial adaptor, and not just a Serial-25-pin to serial-9-pin adaptor? Back in the old days serial ports were 25 pin.)


Hello, in fact you are correct about the adapter, it is a 25 to 9 pin adapter. I think I read somewhere that is is an rs232 plus a couple of extra wires (possibly power wires) thrown in. I’m led to believe that the keyboard originally used a ‘.keys’ file and I’m guessing that would be a driver or decoder.

Many thanks

Please Log in or Create an account to join the conversation.

More
31 Oct 2017 13:37 #101060 by andypugh
If it's a pure serial keyboard there might be some help here:
www.raspberrypi.org/forums/viewtopic.php?f=29&t=163497

Do you anticipate using the keyboard to type G-code into a text editor? Or purely as button presses to control LinuxCNC?

Please Log in or Create an account to join the conversation.

More
31 Oct 2017 14:39 - 31 Oct 2017 14:40 #101065 by Toolman321
Preferably I would love an all in one solution, so that I could have all the control in one enclosure without the need for a separate keyboard, but at the same same it wouldn’t be a big problem to add a usb socket to the enclosure and use a standard keyboard. Ideally a full panel mount membrane style keyboard to fit on my panel of no more than 400mm wide, but that’s really a long shot unless I can salvage something from the depths of eBay..
Last edit: 31 Oct 2017 14:40 by Toolman321.

Please Log in or Create an account to join the conversation.

More
03 Nov 2017 16:08 #101260 by andypugh
If the keyboard you have is laid out as a matrix then there is a HAL component that can be used to drive it:
linuxcnc.org/docs/2.7/html/man/man9/matrix_kb.9.html
That would involve bypassing any existing interface circuit. On the plus side the key presses then go directly to HAL in realtime. (but can't be used to type into user-space text entry)
The following user(s) said Thank You: Toolman321

Please Log in or Create an account to join the conversation.

More
03 Nov 2017 23:39 #101297 by Toolman321
Thankyou, im not sure what you mean by user space text entry?

Please Log in or Create an account to join the conversation.

More
04 Nov 2017 00:03 #101298 by andypugh
Things like typing into a text editor, or the Axis MDI window.
The following user(s) said Thank You: Toolman321

Please Log in or Create an account to join the conversation.

More
04 Nov 2017 00:55 #101299 by InMyDarkestHour
Author says the project is for Barcode scanner, but maybe it could be adapted if you can find the protocol of the keyboard you have.

github.com/theatrus/softwedge

Also found this, maybe of use

www.denfordata.com/bb/viewtopic.php?t=3103
The following user(s) said Thank You: Toolman321

Please Log in or Create an account to join the conversation.

More
06 Feb 2020 23:07 #156663 by bymccoy
I've got one of these, with the intention of using it as a nice console...

It's serial - it has a DB25 port like all Denford stuff had (don't think they ever knew about DB9s), but just needs a basic adapter.

Checking the circuitry out, can confirm it's a very simple two-wire RX/TX, plus ground, and then uses the RX/DTS/RTS for power from the host.

Using screen, or something similar (I'm using CoolTerm), you can get the HEX and ASCII output - and it's simply ASCII corresponding to each button. Nicely there's a button down character and a button up character (handy for modifiers, and repeating an entry until the up character is received). The character is sent only once on either down or up, no repeats etc like a keyboard.

Mine is the fixed variety, so no "overlays" which the later models had (they were a grid of buttons, and plastic overlay cards with the graphics on them). Those are the same, but there's a predefined grid corresponding to the ASCII generated, and each "overlay" had a mapping file accordingly. But, hooking this to a serial converter/port, and watching the ASCII is the easiest way of figuring out what each button generates.

So, my thought is a simple Python script etc to take the ASCII, map it etc and then send it to a pipe, for some function in LXCNC to listen to. The only thing I'm trying to figure out, is how to enable the 2x LED (one for "coolant on" and the other for "external keyboard").

They'll be ASCII I'm sure, but need to figure out what they are.

All in all, quite a nice input device given how cheap they are, and simple they are to get working. I'd class them as "driverless", as they produce ASCII, and you just need to map the ASCII somehow...

Please Log in or Create an account to join the conversation.

Time to create page: 0.156 seconds
Powered by Kunena Forum