Hello Guest it is December 21, 2024, 12:09:07 PM

Author Topic: USB JoyPad and game device plugin - New Version 2.0  (Read 377640 times)

0 Members and 1 Guest are viewing this topic.

Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #10 on: February 15, 2011, 09:11:38 AM »
Hi mutski,

This is weird. Normally when you disconnect the gamepad, Mach3 should load. I've encountered such problem when I used Mach2 classic screen on Mach3. I would suggest that you once again reinstall Mach3 and check if the problem is solved.

Offline area51

*
  •  102 102
    • Joakim's Technical Explorations
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #11 on: February 15, 2011, 04:21:28 PM »
Hi mutski,

uninstalling is easy, just move or delete the JoyPad.dll file in the Plugins directory (C:\Mach3\Plugins\).
When JoyPad.m3p is installed, it is just renamed to JoyPad.dll and moved into the Mach3 Plugins directory.

If you still have problems after removing the JoyPad.dll file, it is not caused by the plugin.

Hope this helps.
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #12 on: February 15, 2011, 05:27:44 PM »
Hi guys. I believe I found the problem. When I pulled the computer out to plug the joystick into a rear USB port, it must have dislodged my PCI parallel port card slightly (it's not bolted down because the card came with a full size bracket and my computer has half size brackets. I've been meaning to use the CNC to mill out the hole).

I tried reinstalling Mach and it loaded fine, but when I changed the settings over from the onboard parallel port to my extra card mach just crashed again. I then check the address in control panel and it was missing altogether. That's when I opened up the computer to discover it not sitting properly. I've now got Mach running again, although I haven't tried the joystick plugin. I'll do that today sometime.

Cheers all - Matt
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #13 on: March 21, 2011, 12:59:37 PM »
I having problems, I made a custom board with a usb joypad and installed the plugin and it´s works, but I want to control Z axis with the same buttons with I control the feedrate of my board when Alt Left is pressed. But the JoyPadSetup.exe dont have that function, I look in the M800.m1s file and found something like that: ' <-- Put your own script code here, but how asign a macro for diferents buttons, all in the same M800.m1s ????

Offline area51

*
  •  102 102
    • Joakim's Technical Explorations
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #14 on: March 21, 2011, 08:05:43 PM »
Nice use of a gamepad  :)

First script must be activated for the shift + button combination (-- Execute Script --) in JoyPadSetup program as described in the manual (restart Mach to load the changes).
To test if assignments work, use the default generated M800.m1s macro. It will write out pressed button and shift state to Mach3 status line.

All buttons assigned to script will call the same M800 macro but with different parameters - as an example the script for the two button combination B1+AL and B2+AL could be:

Code: [Select]
If Button = B1 And AL Then
  ' The script code for B1 + AL
  ' This script part is only executed when Button is B1 and AL is True
  Message "M800: You pressed B1 + AL"
End If

If Button = B2 And AL Then
  ' The script code for B2 + AL
  ' This script part is only executed when Button is B2 and AL is True
  Message "M800: You pressed B2 + AL"
End If

End ' End macro here

The value of Button will depend on the button pressed and AL will only be true if AL was pressed - this way you can write script for the two buttons using If  statements.

- Joakim
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #15 on: March 21, 2011, 08:11:23 PM »
Nice use of a gamepad  :)

First script must be activated for the shift + button combination (-- Execute Script --) in JoyPadSetup program as described in the manual (restart Mach to load the changes).
To test if assignments work, use the default generated M800.m1s macro. It will write out pressed button and shift state to Mach3 status line.

All buttons assigned to script will call the same M800 macro but with different parameters - as an example the script for the two button combination B1+AL and B2+AL could be:

Code: [Select]
If Button = B1 And AL Then
  ' The script code for B1 + AL
  ' This script part is only executed when Button is B1 and AL is True
  Message "M800: You pressed B1 + AL"
End If

If Button = B2 And AL Then
  ' The script code for B2 + AL
  ' This script part is only executed when Button is B2 and AL is True
  Message "M800: You pressed B2 + AL"
End If

End ' End macro here

The value of Button will depend on the button pressed and AL will only be true if AL was pressed - this way you can write script for the two buttons using If  statements.

- Joakim

Thankyou, and thankyou too for share the plugin :D
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #16 on: March 29, 2011, 03:09:38 PM »
Nice use of a gamepad  :)

First script must be activated for the shift + button combination (-- Execute Script --) in JoyPadSetup program as described in the manual (restart Mach to load the changes).
To test if assignments work, use the default generated M800.m1s macro. It will write out pressed button and shift state to Mach3 status line.

All buttons assigned to script will call the same M800 macro but with different parameters - as an example the script for the two button combination B1+AL and B2+AL could be:

Code: [Select]
If Button = B1 And AL Then
  ' The script code for B1 + AL
  ' This script part is only executed when Button is B1 and AL is True
  Message "M800: You pressed B1 + AL"
End If

If Button = B2 And AL Then
  ' The script code for B2 + AL
  ' This script part is only executed when Button is B2 and AL is True
  Message "M800: You pressed B2 + AL"
End If

End ' End macro here

The value of Button will depend on the button pressed and AL will only be true if AL was pressed - this way you can write script for the two buttons using If  statements.

- Joakim

Thankyou, and thankyou too for share the plugin :D

Hi I'm in trouble again, the script works very well, but... when I push the button for Z+ or Z- in my joypad the Z axis moves and never stop!!! y have to press the STOP buton before the torch crash, do you know how to do when i release the button Z+ or Z- the axis stop?

this is the macro:

If Button = B3 And AL Then
DoOEMButton(311)               'this is for Z up
End If   

If Button = B4 And AL Then
DoOEMButton(312)               'this is for Z down
End If

Offline area51

*
  •  102 102
    • Joakim's Technical Explorations
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #17 on: March 29, 2011, 07:14:39 PM »
It could be that you are in continuous jog mode. In the plugin joystick step mode I explicitly select incremental jog mode before step jogging.

Try this:

Code: [Select]
If Button = B3 And AL Then
  DoOEMButton(205)               ' Set Jog Mode Incremental
  DoOEMButton(311)               'this is for Z up
End If   

If Button = B4 And AL Then
  DoOEMButton(205)               ' Set Jog Mode Incremental
  DoOEMButton(312)               'this is for Z down
End If

- Joakim
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #18 on: March 29, 2011, 07:21:27 PM »
It could be that you are in continuous jog mode. In the plugin joystick step mode I explicitly select incremental jog mode before step jogging.

Try this:

Code: [Select]
If Button = B3 And AL Then
  DoOEMButton(205)               ' Set Jog Mode Incremental
  DoOEMButton(311)               'this is for Z up
End If   

If Button = B4 And AL Then
  DoOEMButton(205)               ' Set Jog Mode Incremental
  DoOEMButton(312)               'this is for Z down
End If

- Joakim

Thanks it works!! but the movement is in steeps if you know how do the same but in continous movement I will be very very happy :D

Offline area51

*
  •  102 102
    • Joakim's Technical Explorations
Re: USB JoyPad and game device plugin - New Version 2.0
« Reply #19 on: March 29, 2011, 07:30:40 PM »
Great!

The continuous movement puzzle I will leave to more skilled script programmers...  ;)
I'm sure it can be done somehow.