Sliders for overrides in gmoccapy

More
31 Aug 2024 14:27 #309089 by arijitdutta
I am using Axis for my lathe currently. I was recently looking at the gmoccapy GUI in sim mode, everything is much better here. But one thing is keeping me off from using it is the sliders for the Rapid/feed/spindle/jog override. In axis, one can just move the sliders from 0 to 100 in half a second, but you have to press the '+' or '-" to adjust them. Are there any shortcuts for this or any way to get adjustable sliders in gmoccapy like axisui? Thanks in advance.

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

More
31 Aug 2024 14:40 #309090 by tommylight
In Axis, number keys from ` to 0 (yes the first is the tidle key under ESC and to the left of 1) are feed overrides so you can press them at any time to set the feed speed, meaning the ` is 0 feed rate so the machine will not move, 1 is 10%, 2 is 20% and so on.
No idea if that works for GmoccaPy.

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

More
31 Aug 2024 15:07 #309092 by arijitdutta
Yes, axis supports 1-0 for feed overrides. Sadly it doesn't work on gmoccapy. I can see in some videos over youtube that there used to be sliders at sometime. As a beginner in CNC the sliders and shortcuts are very very useful for me

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

More
31 Aug 2024 15:51 #309096 by Aciera
You could try using the 'hal_input' component and see what keys your keyboard offers. These can then be connected in hal to the .increse/.decrease pins of gmoccapy.
linuxcnc.org/docs/html/gui/gmoccapy.html#_hal_pins

example:

1. open a terminal and type:
lsusb

2. find your keyboard in the output
example: 'Bus 003 Device 002: ID 17ef:608c Lenovo Lenovo Calliope USB Keyboard'

3. Add this to the [HAL] section of your ini file using one of the words from the keyboard identification from above to identify the device (for our example we use 'Keyboard')
HALCMD = loadusr -W hal_input -K +Keyboard:0

4. Start your config, enter the settings page and click on the 'Halshow' button in the lower right corner

5. Navigate to pins/input/0/ and check if any function keys have been recognized:

 

6. In our example there are some function keys we can use (eg 'input.0.key-volumeup', 'input.0.key-volumedown')

7. Connect these pins to the relevant gmoccapy halpins in the POSTGUI_HALFILE (eg to control the linear jog velocity):
net jog_speed_plus <= input.0.key-volumeup => gmoccapy.spc_lin_jog_vel.increase
net jog_speed_minus <= input.0.key-volumedown => gmoccapy.spc_lin_jog_vel.decrease

possible pins can also be found in pins/gmoccpy.
 

linuxcnc.org/docs/html/man/man1/hal_input.1.html
Attachments:
The following user(s) said Thank You: tommylight, zz912, arijitdutta

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

More
31 Aug 2024 17:16 #309101 by arijitdutta
Thank you for the detailed walkthrough. I understand now how to set things up. Though it will take sometime.

But before that, when I run lsusb in terminal, it shows me "command not found". I have to run that through less /proc/bus/input/devices .. to see the unique name for my keyboard. After I add the loadusr command to my ini file in the HAL section, the keyboard button still doesn't show up in my HALshow (I am currently trying all of this on axisgui). It only shows up my gamepad. I tried to input the command directly into the HAL file, but it still doesnt show up. Am I doing anything wrong? As I feel 'lsusb' should have shown something in the terminal

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

More
31 Aug 2024 23:27 #309118 by Aciera
1. 'less /proc/bus/input/devices' is fine. If you want you can install 'lsusb' with:
sudo apt install usbutils

2. If you see pins for your gamepad instead of your keyboard under pins/input/ then that would indicate that the key word you entered in the 'loadusr ...' command is not unique to your keyboard device.
You would have to post the output of 'less /proc/bus/input/devices' or 'lsusb' for better analysis.
The following user(s) said Thank You: arijitdutta

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

More
01 Sep 2024 05:07 - 01 Sep 2024 05:09 #309129 by arijitdutta
There are a lot of things that are working on my laptop linuxcnc install on my relatively new laptop VM but not on my dedicated PC (very old one, even has a parallel port) where I have connected the mesa board. Like, if you click on the clock, an error comes up. Following that after putting sudo apt install usbutils, I get :

arijitdutta@kiko:~$ sudo apt install usbutils[sudo]
password for arijitdutta:
Reading package lists...
DoneBuilding dependency tree...
DoneReading state information...
DonePackage usbutils is not available, but is referred to by another package.This may mean that the package is missing, has been obsoleted, oris only available from another source.
However the following packages replace it:  usb.idsE: Package 'usbutils' has no installation candidate
arijitdutta@kiko:~$ sudo apt install usb.ids
Reading package lists...
DoneBuilding dependency tree...
DoneReading state information...
Doneusb.ids is already the newest version (2024.01.20-0 deb12u1).0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Whereas the command works on the VM in my laptop with an identical install process. I don't know what's wrong with my desktop.
Attaching my input devices after 'less /proc/bus/input/devices' in a separate file so that I dont flood it here..

File Attachment:

File Name: devices.txt
File Size:3 KB
Attachments:
Last edit: 01 Sep 2024 05:09 by arijitdutta.

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

More
01 Sep 2024 07:29 - 01 Sep 2024 07:30 #309133 by Aciera

N: Name="Logitech Wireless Keyboard PID:4023"


Looks like this should work:
HALCMD = loadusr -W hal_input -K +Keyboard:0
Last edit: 01 Sep 2024 07:30 by Aciera.

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

More
01 Sep 2024 18:03 #309163 by arijitdutta
Sadly, it doesnt.. 

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

More
02 Sep 2024 12:18 #309208 by Aciera
Maybe you could use your gamepad instead. Lot of buttons on those things.

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

Time to create page: 0.139 seconds
Powered by Kunena Forum