Hello Guest it is March 28, 2024, 05:06:30 AM

Author Topic: Using Joypad plugin in a hybrid mode  (Read 5070 times)

0 Members and 1 Guest are viewing this topic.

Using Joypad plugin in a hybrid mode
« on: June 15, 2010, 12:04:34 PM »

Hello all,

I have devised a hybrid solution to Area51's joypad plugin which so far works fine for me and would like to share it in gratitude of the knowledge I have gained in here.

Historically, after buying a generic dual shock gamepad, I started by the guidelines of the universal thread of “There is a God…”, soon to realize that the joystick plugin works only with two axes and I must find some other plugin that could work with it.

Most fortunately I found Area51’s thread whom has generously posted his plugin is his thread which I would personally like to thank him:

http://www.machsupport.com/forum/index.php/topic,12325.0.html

This plugin supports two joystick, therefore 4 axes could be managed and is the core of this setup.

I managed to change the macros for some buttons. Some buttons worked perfectly, and some appeared to be not fully functional. For example, pushing the “start cycle” button works normal, but when I push the “feedhold” button, it does not act. Actually after the “start Cycle” button is pushed, no interaction with other buttons, such as “feedrate+” is available. Or pushing the “single blk” will activate it, but subsequent pushing of the cycle start will not stop it at the end of the line’s execution and will go on to the end of the file. Or the “Reset” button can not be toggled. All of these, I believe is due to my lack of knowledge of macros.

In order to overcome this issue, I tried to Combine the keygrabber and the joypad plugin together. Therefore using the keygrabber when the macros don’t work as expected and use the macros whenever they work normally. Of course I should add that it would be best if all were driven by macros and I hope Area51 or any other participants would direct me on this, since my knowledge on this matter is limited.

I could provide most of the actions that I needed. For example I can now jog in increments and also change the increments from the gamepad, accurately zero the tool. Or increase/decrease the feedrate during machining operation. The trick was to assign some buttons (even the 5 and 6 buttons) to another <page> via the special keys. You will notice that no joystick assignment is made in the keygrabber, rather is some cases, key assignments are given to these sticks. Please refer to Area51’s thread for more explanations in his attached readme file.

Some explanations are in order:
I used the term <shift> for buttons 5 and 6 which previously have been allocated by Area51 as special key of <third page>. the term <alt> refers to the key assignments in button7 as special key of <second page>. This provides even more buttons to be assigned to the gamepad.

Laying out the buttons are a matter of personal preference. Personally I have two objectives in my mind:
Fewer keys, so to be remembered easily and could be worked almost instinctively.
Avoiding accidentally pushed buttons to perform dangerous actions such as cycle start. Unwanted jog movements have been already foreseen by Area51 himself.

So far I have devised this setup in 5 categories, which might suit different purposes.
3 axis movement with 3 motors with reference all button.
3 axis movement with 3 motors without reference all button.
3 axis movement with 4 motors without reference all button.
4 axis movement with 4 motors without reference all button.
4 axis movement with 5 motors without reference all button.

The attached zipped file contains the requirements for the 3 axis movement with 3 motors with reference all button:

A folder which contains the macros.
The default[1].grb file. (I should note that I installed the driver from the installation CD of the gamepad).
An excel file describing the details of the buttons, their functions, assigned macros and so on.

I hope this thread might encourage Area51 to get some time to complete what he has started. And I also request and appreciate any comments, direction or enhancements to this setup.

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Using Joypad plugin in a hybrid mode
« Reply #1 on: June 16, 2010, 09:51:54 AM »
Nice work Atifeh, you must have put a lot of time into this, thanks for sharing the information.

Tweakie.
PEACE
Re: Using Joypad plugin in a hybrid mode
« Reply #2 on: June 16, 2010, 12:13:19 PM »
Thanks Tweeakie, did you test it?

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Using Joypad plugin in a hybrid mode
« Reply #3 on: June 16, 2010, 12:21:50 PM »
Not tested yet, but I will let you know if I have any problems.

Tweakie.
PEACE
Re: Using Joypad plugin in a hybrid mode
« Reply #4 on: September 16, 2010, 11:00:57 AM »
Hello Atifeh,
Where are you with this endeavour?  I am very interested in your findings here.
DT
Re: Using Joypad plugin in a hybrid mode
« Reply #5 on: September 17, 2010, 07:04:36 AM »
Hello Tom,
This hybrid configuration is working fine. I have installed in on 4 other machines without a problem. There are shortcomings on it though, mainly because I can not write a plugin. I was waiting for Area51 or others that are fluent, in providing a plugin that could be customized.
 
Re: Using Joypad plugin in a hybrid mode
« Reply #6 on: September 17, 2010, 10:08:10 AM »
Thank you for the update, I shall DL the file and give it a try.
Tom