Question about keyboard for cnc build

More
6 years 8 months ago #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
6 years 8 months ago #157523 by bymccoy

bbsr_5a wrote: 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.

More
6 years 8 months ago #157524 by bymccoy

BeagleBrainz wrote: 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 ?


I do have pics, but it's basically a PIC, a serial interface etc. The keyboard is of course a row/col matrix, but the hardware is doing just fine. The serial interface works perfectly - the cable etc is a regular one, and I've got a couple of serial interfaces on the industrial PC's that I use.

The only real question is how I can get the ASCII from the serial interface and into LinuxCNC.

It would seem one option is to somehow get it to appear as a serial keyboard (well, it basically is a traditional serial keyboard!) and then use HAL_input to access the input device. As that seems a bit hokey and going to require building kernel drivers etc (there's got to be something out there already?!), the easiest options are:

a) a standalone python script that uses the linuxcnc module, and listens to the serial interface. It can then be mapped to pins accordingly - I do need to figure out how to interact with the Axis UI (ie flipping between menus), but I can always extend Axis to use pins to determine the menu to show etc.

b) an extension menu/module for Axis using python - pretty much as above, but run as a menu/integral script.

Not a big job really, but it's figuring the most lazy/efficient way of getting the ASCII characters into the right place. Nicely, the keyboard generates both keydown and keyup characters, so I can have modifiers, or have repeats on axis nudging for example (ie keep moving the axis until keyup).

These keyboards are very nice, so if this works well I'll be lining up to get a few more :D

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

  • BeagleBrainz
  • New Member
  • New Member
More
6 years 8 months ago #157525 by BeagleBrainz
Replied by BeagleBrainz on topic Question about keyboard for cnc build
What about a custom Hal comp that presents each key or modifier and key as a Hal pin ?

Python should be able to handle that.

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

More
6 years 8 months ago #157556 by rodw

bymccoy wrote:

BeagleBrainz wrote: 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 ?


I do have pics, but it's basically a PIC, a serial interface etc. The keyboard is of course a row/col matrix, but the hardware is doing just fine. The serial interface works perfectly - the cable etc is a regular one, and I've got a couple of serial interfaces on the industrial PC's that I use.

The only real question is how I can get the ASCII from the serial interface and into LinuxCNC.


I think to do what you want to do it will be a user space (non-real time) compnent written in Python. There are a number of examples of talking to a serial device eg:
github.com/LinuxCNC/linuxcnc/blob/master..._comps/mitsub_vfd.py

but I don't know about a keyboard.

The 7i73 route will be real time and include the ability to manage MPG's and LCD's etc.

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

More
6 years 8 months ago #158633 by andypugh
If you can get scan-codes in to LinuxCNC HAL then the matrix_kb component can make them in to HAL pin state changes.

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

Time to create page: 0.437 seconds
Powered by Kunena Forum