Questions on interfacing a MAHO Phillips 432/10 keyboard with mux_generic.

More
11 Dec 2017 18:41 - 11 Dec 2017 20:41 #102921 by RotarySMP
I was discussing interfacing the MAHO / Phillips 432/10 keyboard into LinuxCNC with Jens from Germany, who has a 600E.


This browser does not support PDFs. Please download the PDF to view it: Download PDF



The keyboard's 69 keys (numbered 1-80 with gaps) are multiplexed out on a simple 8x10 matrix of 18 pins of a 25 pin D-Sub connector.


The two attached pdfs Blatt1 and Blatt2 go together.

Jens already surveyed the pinout, and it looks like this. The blue numbers are MAHO's assigned key numbers.


Q1/ Can mux_generic do a non-square matrix like 8x10?

Q2/ Is this correct syntax?
loadrt mux_generic config="bb80” # Load rt component MUX-Generic configuered for bit in, bit out with 80 pin
addf mux-gen.00 servo-thread

Then we create some placeholder signals for the 18 input pins to connect to...
Net key_pin_01 <= hm2_5i25.0.7i84.0.1.input-01
Net key_pin_02 <= hm2_5i25.0.7i84.0.1.input-02

...

Then those signals are connected to the mux_generic input pins. This is the bit I dont understand from the documentation and other threads on the topic.
Q3/ How do I code it to make the rows and column assignments of an 8x10 matrix. Is it with some clever binary code at the end of the ...sel-bit command?

Net key_pin_01 => mux-gen.00.sel-bit000
Net key_pin_02 => mux-gen.00.sel-bit001

...
The mux_generic output pins are then available to be connected to the required functions in LinuxCNC like this.
Q4/ Will those output pins be ...out.bit.00 through ...out.bit.79?
Q5/ Does the count start at top LHand go across then down, line by line?
Net mux-gen.00.out-bit.61 => gmoccapy.jog-x-minus
Net mux-gen.00.out-bit.70 => gmoccapy.jog-x-plus

Mark.
Last edit: 11 Dec 2017 20:41 by RotarySMP.

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

More
12 Dec 2017 01:53 - 12 Dec 2017 01:53 #102965 by andypugh
Last edit: 12 Dec 2017 01:53 by andypugh.

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

More
12 Dec 2017 07:04 #102978 by RotarySMP
Darn. That looks a lot more like a solution. Thanks Andy.
Mark

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

More
12 Dec 2017 08:18 #102981 by RotarySMP
I started reading forum threads on matrix_kb. Andy you wrote in this thread:
forum.linuxcnc.org/24-hal-components/335...for-cnc-build#101260

...but can't be used to type into user-space text entry.


The MAHO keyboard includes a combination of functional keys, which will correspond directly to HAL functions, but also keys such as the numerical keypad, which are used for user-space entry in the MDI.
The matrix of keys is rather mixed up, so you cant just spit out the line/column of user space input keys from the function keys and have two matrices. Show stopper?
Mark

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

More
12 Dec 2017 17:29 #103018 by PCW
I suspect that could be done by having the matrix scanner hand off some (translated) keycodes to
a realtime FIFO comp that in turn forwards the buffered keystrokes to a userland
component that feeds them to uinput

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

More
12 Dec 2017 17:35 #103019 by andypugh
Someone else is asking for this in a different thread.

I did originally have keystroke-output in the matrix_kb component, but couldn't be sure that the kernel function calls were thread-safe.

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

More
12 Dec 2017 17:39 - 12 Dec 2017 17:45 #103021 by PCW
I dont think they are, that's why i assumed the components feeding keystrokes to the OS
need to be separated into a real time part and a userland part (sort of like halsampler)
Last edit: 12 Dec 2017 17:45 by PCW. Reason: clarify

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

More
12 Dec 2017 23:05 #103045 by InMyDarkestHour
Would a module (teensy ++ 2.0 comes to mind) with the LUFA usb stack work ?

I've been playing around with a couple of atmega32u4 (Sparkfun Pro Micro, Arduino Micro clone, similar to Leonardo) and the LUFA usb stack for a simple pendant and a quick and dirty control panel.

Configure it for a USB keyboard for buttons that require keyboard input and joystick to be used with halinput or hidcomp to expose those buttons that you want as pins ? The one physical device would appear as two devices when enumerated.

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

More
12 Dec 2017 23:38 #103049 by PCW
I think that's fine for keypad entries but really not optimum for things like jog buttons.
By real time keypad scanning and handing off the non-time critical keypad stuff to
a userland shim, you get both keystrokes and real time reaction to critical keys

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

More
13 Dec 2017 09:27 #103066 by RotarySMP
Thanks for your responses.

While there are nostalgic reasons to reused the Phillips/Maho keyboard, I am not wedded to it. Since there is no trivial way to interface both the Userspace and HAL function buttons at this time, I'll leave this topic for someone more committed to the MAHO interface. Actually those keyboards seem to all have worn out buttons, so I think I'll just mount mine on the wall as a momento :)

Gmoccapy seems really well thought out. I havent used it to mill yet, but like the interface design, even if it is a little too colourful for my taste.
Mark

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

Time to create page: 0.391 seconds
Powered by Kunena Forum