USB HID Interface

More
11 Jan 2023 21:19 #261625 by COFHAL
USB HID Interface was created by COFHAL
I have been doing several tests with USB HID interfaces like the BUO0836A by Leo Bodnar, MARTZIS USB hid interface and MMJOY2, all these interfaces have inputs that can be used with encoders, but only the MARTZIS USB HID interface, the 8 inputs (two for each encoder) that it has for encoders is recognized by LINUXCNC as encoders, that is to say that in the HAL METER, in inputs, the pins rel-x-counts,rel-y-counts,rel-z-counts,rel-rx-counts appear , and turning the encoder changes the values of those pins. On the contrary, in the USB HID interface by Leo Bodnar and MMJOY2, despite the fact that some inputs are programmed to connect encoders, they do not appear within the pins that linuxcnc creates when these interfaces are loaded. The only difference between the MARTZIS and the other two is that MARTZIS has 8 dedicated inputs exclusively for the connection of 4 encoders, while the other two encoders can be programmed in any pair of continuous inputs available. Could this problem be due to the firmware installed on each of these HIDs?

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

More
12 Jan 2023 23:43 #261755 by andypugh
Replied by andypugh on topic USB HID Interface
Have you tried to see what events the devices output?

They need to declare EV_REL or EV_ABS for linuxcnc to create encoder outputs:
github.com/LinuxCNC/linuxcnc/blob/master...r_comps/hal_input.py

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

More
16 Jan 2023 13:42 #262122 by COFHAL
Replied by COFHAL on topic USB HID Interface
Thank you very much for your reply. I already understood how the entries that are programmed as encoders work in these two HIDs. Its behavior will be that of the A and B inputs of an encoder, and simply what I did was use the HAL's ENCODER component and LNC uses it as such, and if the encoder is turned in the CW direction it counts positively and if it is turned in the CCW direction the counts are negative.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum