WHB02 remote control to QtPlasmac

More
1 year 3 months ago #332009 by Franklin
So, with the help of the AI assistant I found out that it is a HID device. I entered the command: sudo cat /dev/hidraw4
then when I press the keys, characters appear in the terminal.

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

More
1 year 3 months ago #332257 by Franklin
Hello, can you tell me if there is a way to connect remote control signals to the jog buttons of the qtplasmac interface?
halui.joint.N.plus is missing, and joint.0.jog-counts is difficult.
Would like to have external qtplasmac pins for joging

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

More
1 year 3 months ago #332324 by andypugh

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

More
1 year 3 months ago - 1 year 3 months ago #332330 by Franklin
Thank you, but I have already changed the plasmac component and got the result I wanted. I added a few lines:
   self.extJogXplusPin = self.h.newpin('ext_jog_x_plus', hal.HAL_BIT, hal.HAL_IN)
   self.extJogXminusPin = self.h.newpin('ext_jog_x_minus', hal.HAL_BIT, hal.HAL_IN)
   self.extJogYplusPin = self.h.newpin('ext_jog_y_plus', hal.HAL_BIT, hal.HAL_IN)
   self.extJogYminusPin = self.h.newpin('ext_jog_y_minus', hal.HAL_BIT, hal.HAL_IN)
   self.extJogZplusPin = self.h.newpin('ext_jog_z_plus', hal.HAL_BIT, hal.HAL_IN)
   self.extJogZminusPin = self.h.newpin('ext_jog_z_minus', hal.HAL_BIT, hal.HAL_IN)

   self.extJogXplusPin.value_changed.connect(lambda v: self.gui_button_jog(1 if v else 0, 'x', 1))
   self.extJogXminusPin.value_changed.connect(lambda v: self.gui_button_jog(1 if v else 0, 'x', -1))
   self.extJogYplusPin.value_changed.connect(lambda v: self.gui_button_jog(1 if v else 0, 'y', 1))
   self.extJogYminusPin.value_changed.connect(lambda v: self.gui_button_jog(1 if v else 0, 'y', -1))
   self.extJogZplusPin.value_changed.connect(lambda v: self.gui_button_jog(1 if v else 0, 'z', 1))
   self.extJogZminusPin.value_changed.connect(lambda v: self.gui_button_jog(1 if v else 0, 'z', -1))
It works great. 
Last edit: 1 year 3 months ago by Franklin.

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

Moderators: snowgoer540
Time to create page: 0.342 seconds
Powered by Kunena Forum