Hello Guest it is April 24, 2024, 08:28:49 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - atifeh

Pages: 1
1
General Mach Discussion / Assigning single axis homing on a gamepad
« on: August 04, 2010, 12:23:11 PM »
I need to assign four buttons on my gamepad so that they execute the following commands independently:
POV E -> G0 X0
POV S -> G0 Y0
POV N -> G0 Z0
POV W -> G0 A0

First, let me explain why I need this. There are times when I have to set the Z zero plane, halfway the height of the part. If GOTO HOME is executed, during travel to x0,y0,z0, the tool has been lowered so that it might hit the part. My way to avoid this is to jog the Z axis up; then type g0 x0 y0. Also I might need to verify the Z0 height. For this I have to jog the X and Y axis outside the part and then type g0 z0. For all of these cases I have to type on the keyboard.

I want to do this on my gamepad. Namely on POV buttons while button 7 is pressed. Please refer to thread  http://www.machsupport.com/forum/index.php/topic,15127 . There is a limitation that area51's macros (thread http://www.machsupport.com/forum/index.php/topic,12325.0.html ) do not use the button 7 for further options and I have to assign these by the keygrabber.

For now I have only defined OEMCode 138, which moves all the axes to part's home and could not find any specific codes for this purpose, therefore I have to resort to using "Code:" in some kind of scripts and assigning the abovementioned tasks.

How could I write and assign these macros? Your help will be greatly appreciated.

2
General Mach Discussion / 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.

Pages: 1