Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 06:24:31 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Finished Plugins for Download
| | | |-+  Free USB JoyPad plugin
Pages: 1   Go Down
Print
Author Topic: Free USB JoyPad plugin  (Read 3805 times)
0 Members and 2 Guests are viewing this topic.
area51
Active Member

Offline Offline

Posts: 45


View Profile
« on: August 14, 2009, 10:41:54 AM »

Looking for a USB JoyPad plugin to Mach3?

Maybe the solution is here...

I have for some time been looking for a plugin to my "Logitech USB Dual Action JoyPad", but didn't find it (maybe I was looking the wrong places...).
As a software architect and developer I decided to develop my own plugin.

The plugin should support:

  • at least 4 axes for jogging
  • low and high speeds for jogging
  • safety button to prevent accidental activation
  • easy configuration of button actions using VBScript
  • easy to use

The plugin is developed using the Mach SDK 2.6 in C++, MFC, Visual Studio 2008 and uses only standard Windows components - no need for additional software. C++ is not my preferred  programming language (C# is) but it was fun and a brush up on early days C++ skills.
Now the plugin has reached a state where it is usable, so I decided to publish it in this forum - there may be others looking for a JoyPad plugin (as I did).

The JoyPad plugin is free and "as is" (ie. no support and guaranty).
If you like it, find errors or have suggestions, please let me know.

I have attached the plugin dll and read me files in "Mach3_JoyPad_Plugin_beta.zip" and the read me file "ReadMe.txt".
Instructions for usage and installation is found in the read me file.

* Mach3 JoyPad Plugin beta.zip (133.28 KB - downloaded 567 times.)
* ReadMe.zip (2.71 KB - downloaded 498 times.)
« Last Edit: August 14, 2009, 10:45:30 AM by area51 » Logged
gforce
Active Member

Offline Offline

Posts: 35


View Profile
« Reply #1 on: November 11, 2009, 12:29:25 PM »

This plugin seems to work really well in PP mode.  Would it be possible to update it to work with the smoothstepper?  The buttons work but not the dual joysticks.

Thanks.
Logged
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 3,598


Precision Chaos



View Profile WWW
« Reply #2 on: November 11, 2009, 12:54:34 PM »

Thanks Area51. I'm not sure how I missed this in August but thanks for the contribution. Generous acts like this by our members is one of the things that makes our forum great.  Smiley  There is nothing better than people working together IMO.

Brett
Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
area51
Active Member

Offline Offline

Posts: 45


View Profile
« Reply #3 on: November 12, 2009, 12:22:08 PM »

Thanks for the response to my plugin!
Response is very important when you are a newbe, as I am ;-)

This plugin seems to work really well in PP mode.  Would it be possible to update it to work with the smoothstepper?  The buttons work but not the dual joysticks.

In the JoyPad plugin the jogging is implemented as described in March SDK documentation - controlling the engine in Marc. I communicates with the JoyPad through Windows MultiMedia api, this way all types of game controllers should work (Joystick, GamePad, JoyPad etc.).

If Parallel Port (PP) works, but not SS there must be a missing connection between March engine and SS plugin.
Looking at SS homepage www.warp9td.com I find no documentation on how to communicate jog speed and direction to SS plugin or how SS is communicating with March engine at all.
(Anyone have some documentation/sample on SS api? Please help)

It would be nice if I could support SmoothStepper and even nicer if I had a sample SS to test the plugin on.
(Even at $155 SS is a little over the edge of my budget right now...)

- Joakim
Logged
elpablito
Active Member

Offline Offline

Posts: 122


View Profile
« Reply #4 on: December 05, 2009, 06:51:32 PM »

Good job Area51!
I was thinking in writing a joypad plugin myself. It would be great if you could add SS support.
Also i would be nice to have a way of moving step by step to set the work origin with precision.
Maybe you could have a button to change from velocity to slow speed

Thanks
Logged
area51
Active Member

Offline Offline

Posts: 45


View Profile
« Reply #5 on: December 06, 2009, 10:08:33 PM »

The movements of the joypads is transformed by a third order function to give more accurate control near zero.
If you have a fast mill I can see the problem...  Wink

I could make the left joypad button toggle between normal/slow speed.
But how slow should slow be (10% normal speed)?

As I wrote in an earlier post I would love to make SS support, but...
Logged
freedom2000
Active Member

Offline Offline

Posts: 36


View Profile
« Reply #6 on: July 21, 2010, 12:53:54 PM »

Hi Joakim,

I really enjoy your plugin. It has added what was missing on the Art's joystick plugin (3rd and 4th axis)

As it is based on a USB HID standard device, it should work with any device supporting this standard.

I have tested it with a microchip board emulating a joystick --> and it is recognized --> Well done.

If I dared, I would ask you to poivide the source code (you mentonned you would do it in the readme file)...
What I would like to do with it is only snif the code for the HID connection... (so I don't need the full software, and I would understand I you don't want to do it !)

I plan to try to setup a simple THC for plasma torch (see my post on tis post http://www.machsupport.com/forum/index.php?topic=10339.new;topicseen#new

As you can see the elctronics is pretty much finished, I am just missing an elegant way to communicate with Mach3... I think that the HID solution with my PIC18F4550 could be the best solution ...

But as I am only an hobbyist without too much time for coding... your help would be highly appreciated !
Of course anything I code is given under GPL license as well... exemple here a driver for CNC DIY board : http://www.usinages.com/driver-de-puissance-maison-pour-moteur-pas-a-pas-t3046-315.html

Cheers
JP
Logged
area51
Active Member

Offline Offline

Posts: 45


View Profile
« Reply #7 on: October 07, 2010, 06:31:41 PM »

Hi JP,

sorry for not seeing your post before.

I am using standard Microsoft Multimedia calls to access the JoyPad, Joystick or game device - no fancy USB HID communication. Interface to the calls can be found in <mmsystem.h>, and c++ statements like:

Code:
    JoyPadState.dwFlags = JOY_RETURNALL;
    res = joyGetPosEx(JoyPadDevNum, &JoyPadState);

Opening the code will not help you with USB HID devices, but I can help with my use of Microsoft multimedia interface.

I just released a new version 1.0 of the plugin with support for SmoothStepper, User manual and new samples of VBScript code. The post can be found at:
http://www.machsupport.com/forum/index.php/topic,16140.0.html

- area51
Logged
freedom2000
Active Member

Offline Offline

Posts: 36


View Profile
« Reply #8 on: October 08, 2010, 01:24:32 PM »

Hi JP,

sorry for not seeing your post before.

I am using standard Microsoft Multimedia calls to access the JoyPad, Joystick or game device - no fancy USB HID communication. Interface to the calls can be found in <mmsystem.h>, and c++ statements like:



Opening the code will not help you with USB HID devices, but I can help with my use of Microsoft multimedia interface.

I just released a new version 1.0 of the plugin with support for SmoothStepper, User manual and new samples of VBScript code. The post can be found at:
http://www.machsupport.com/forum/index.php/topic,16140.0.html

- area51




Ok it's clear --> thanks

JP
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!