Question about keyboard for cnc build

More
06 Feb 2020 23:14 #156665 by bymccoy
Well, the Python API would appear to have most of the functions that are on the keyboard - so a listening loop etc, would seem to be the solution... Some logic for the key being pressed down, so you can use modifiers (if even needed).

So no point of a pipe, just a Python script listening and sending API calls...

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

More
06 Feb 2020 23:30 #156666 by bymccoy
Okay, we'll found the LED commands. Just mashed the keyboard and copied/pasted blocks of ASCII characters until they went on, and then did the same until they went off, and kept narrowing it down...

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

More
07 Feb 2020 08:32 #156684 by bbsr_5a
you can go for a SILIKON Keyboard as it can be clued to the machine itself

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

More
08 Feb 2020 00:17 #156720 by bymccoy
Kind of the point here is to use something that is already made for the purpose, and designed to control the machine itself?

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

More
09 Feb 2020 11:21 #156863 by andypugh

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).


Of you can get the key-down / key-up codes in to HAL then the matrix_kb component can make them toggle HAL pins.

linuxcnc.org/docs/2.8/html/man/man9/matrix_kb.9.html

It is possible to send keystrokes to the OS from HAL. In fact matrix_kb used to do it, but I was unsure if the kernel function calls were thread-safe for realtime.

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

More
09 Feb 2020 21:41 #156911 by bymccoy
Hi Andy,

Thanks for that...

Reading the docs, I'm genuinely confused how I would map any data coming in from the keyboard using the matrix_kb component?

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

More
09 Feb 2020 23:07 #156917 by bymccoy
I've been having a look at HAL_INPUT, and that seem to be the way to go. I just have to coerce the serial keyboard into being a Linux input device - I'm trying to figure out how to have a serial keyboard treated as an input device.

So,
inputattach
would seem to be the solution there. I need to have a play around and see what inbuilt keyboard types will work.

I've also been looking for a serial to USB HID device... That should just convert anything coming by serial into keypresses.

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

More
10 Feb 2020 04:39 #156933 by BeagleBrainz
Can out get physical access to the row\col of the keyboard matrix ? if so a 7i73 could be the answer if you are going the MESA route of a custom USB solution, Arduino ProMicro or another mcu that has native USB.
Or as per your solution an MCU reading the serial and connecting via USB.

Any pics of the guts of the device ?

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

More
10 Feb 2020 14:05 #156956 by bbsr_5a
on ebay there are many controll panels for CNc machines and manufactuers lke HAAS VF serias use a USB compatible keyboard
that can be connected to a COMP

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

More
16 Feb 2020 21:53 #157523 by bymccoy

on ebay there are many controll panels for CNc machines and manufactuers lke HAAS VF serias use a USB compatible keyboard
that can be connected to a COMP


Huh?

Kind of defeats the objective of using EXISTING hardware don't you think? Or should I just replace the CNC machine with a new machine as well, and stop using LinuxCNC, and use a Fanuc controller?
The following user(s) said Thank You: tommylight

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

Time to create page: 0.144 seconds
Powered by Kunena Forum