Machsupport Forum

Third party software and hardware support forums. => Third party software and hardware support forums. => Topic started by: mkullman on November 21, 2015, 11:33:42 PM

Title: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on November 21, 2015, 11:33:42 PM
hello.
First off a shout out to ArtSoft. Thanks for such a great product! I purchased Mach4 almost 6 months ago for my home shop & I have absolutely no complaints so far. compared to what I have to use at work, it is a real joy to use  ;D
 I received a  Xhc HB04 Pendent (http://www.amazon.com/dp/B00PI9IH08/ref=wl_it_dp_o_pC_nS_ttl?_encoding=UTF8&colid=1NZMKTMDODIMQ&coliid=IAC7D7DV6RWLQ) as a birthday present ago and am trying to set this up with my rig.
 Unfortunately it seems to only work with Mach3 and a google/bing/yahoo search brings up nothing for this controller in the way of Mach4. I have seen a few older posts in this forum about using it with Mach3 so I know there are others out there using this device.

Has anyone else tried using this MPG with mach4? and if so were you able to get it to work?

Any help would be greatly appreciated. Cheers!
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: TriMan on April 19, 2016, 05:29:08 PM
Hi,
I would like to know the answer to this too.
Anyone know if there are plans for the XHC pendant to support MACH4.

Craig
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on September 18, 2016, 12:19:39 AM
So after not hearing or finding anything, I took it upon myself to dust off my programming skills and take a crack at writing drivers for this myself. I was successful writing an actual driver for windows, I can read all the button events and read the mpg wheel events as well as write all fields to the screen. However, I slammed into a brick wall trying to write it into a plugin for mach4. After weeks of frustration, I gave up for a while and hung the pendant on the wall of shame. I do revisit the project when work hits a lul and chissle away at it until work picks up again.  The main issue for me is after signing an NDA with newfangled, the "example" they give with the SDK is far from simple and involves stuff that is a bit over my head. Most unfortunately because of the NDA, I cannot really ask for help from the CS experts that I know. So, doing my best to remain honorable to the NDA, I have to relearn everything I thought I knew about plugins...

again, if anyone has a working solution for this already, please tell me before I end up re-inventing the wheel, otherwise, I'll get it working eventually and will post it here when I do.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Tweakie.CNC on September 18, 2016, 01:44:38 AM
Hi mkullman,

Try posting a question in the Mach4 section of the forum (http://www.machsupport.com/forum/index.php/board,94.0.html).
It's quite possible that someone there may have some key information to get you started again.

Tweakie.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on September 18, 2016, 08:12:35 PM
I actually made some progress last night (more like this morning). I finally got the example code to compile and load. Turns out it had some visual studio configuration issues. <facepalm> Now that I have that working, I have to flesh it out the example down to a skeleton and add in the driver portion.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Alex He on October 13, 2016, 09:14:19 PM
Hello, Mr mkullman,

This is Alex He from ChengDu XinHeCheng Technology Co.,Ltd. Only manufacturer for HB04.

I am sorry that our WHB04-L only support Mach3. And we just developed our mach4 card. For handwheel still under developing.

If there is any update, i will let you know

Do you wanna test our mach4 card?
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on October 13, 2016, 10:49:39 PM
Alex, thanks for the info. I understand, it's totally not your fault. The product listing clearly stated that it was for Mach3.   You do have my attention regarding development of a mach4 card and handwheel, and Yes! I would be very interested in testing it.  
 
to update anyone else following this thread:
  I have made significant strides with developing a plugin for mach4. I almost have a working framework, but have had to take long breaks for family & work. I'm getting there slowly but surely. Overall I don't regret having to write a plugin myself, it has been very educational and I now have a deeper appreciation for those that do this stuff for a living.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Alex He on October 13, 2016, 10:53:33 PM
Hello, Mr Mkullman,

Thank you for fast reply.

Can you send me your email ? Then i can show you our mach4 card and speficication.

Thanks
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on January 16, 2017, 11:55:31 PM
Okay, I finally dived back into this after a long break.
I was plugging away at this back in September when my wife's water broke & it has taken me a while to work up the courage to pick up the pieces of my train of thought (just a locomotive and a caboose at this point).
The past week I have made a lot of progress & have something somewhat functional.
It's ugly, but it works. I can read all the needed data and display it on the Pendent. The MPG wheel works for XY&Z axis, FRO% & Spindle speed . and I have mapped a few buttons to do the basic functions I want (Estop, Start, Stop, pause, resume, zero axis, goto zero, increase MPG step amount, and regenerate toolpath)
The ugly is that the driver is unsigned and will require a few extra steps if it is to be installed on win10, I have zero interest in jumping through the hoops to be able to sign windows drivers so this will not be fixed. Also, there is an odd library dependency I'm currently trying to chase down, which can be worked around by installing Visual Studio with the Visual C++ windows SDK on the target pc.

I'm currently using this pendant on my machine and will gladly share the driver and compiled plug-in with anyone that asks for it and is willing to go through a few extra steps to install it.
message me for more info.

if you want the source, you will have to ask ArtSoft to broker an exchange as I signed an NDA with them and cannot share the code directly.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Alex He on January 17, 2017, 12:05:02 AM
Hello, Mr Mkullman,

Can i know what kind of Pendant are you using now?
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on January 17, 2017, 01:28:23 AM
I'm using the same XHC HB04 USB pendant as before and as referenced in the thread topic.
see attached.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Alex He on January 17, 2017, 01:33:23 AM
Ok, we called this Wired mach3 handwheel LHB04.

We have wireless new version WHB04B series, max support 6 Axis.

If you have friend like this.you can ask them to contact me. Thanks


Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on January 17, 2017, 01:44:24 AM
Ok, we called this Wired mach3 handwheel LHB04.
ah, I was going off of the label on the front of the device. Now that I look at it closer, I see the correct model on the rear decal, thanks for correcting my error.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Alex He on January 17, 2017, 01:46:41 AM
You are welcome.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on January 28, 2017, 03:15:20 AM
 ;D I have this about put to bed as far as I am concerned.
I have all buttons of relevance mapped and functioning the way I'd expect them to, plus a few mapped to mach4 inputs for some future lua fun.
I have the MPG wheel working for both a step mode and a velocity mode.
and I have the display updating with all the correct data.

as eluded to above, the windows 10 driver signature issue still exists and will not be addressed (they want $500 for a signature certificate...  ::)) but there is a workaround I have tested and documented. and there is a Microsoft library package that has to be installed for the plugin to work.

Other than that, I've got a working solution for anyone interested. PM me and I'll dropbox you the files needed to get this pendant working under Mach4.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: cncman172 on January 28, 2017, 07:41:45 PM
Mkullman
I am interested in your mods

Russ
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on January 29, 2017, 12:52:58 AM
Russ,
 I've sent you an email with a dropbox file link to the files needed to get this working.
Enjoy! ;D
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Q*bert on February 21, 2017, 02:24:51 PM
Hi Alex.

I have the WHB04B running under Mach3 and I would love to have it supported in Mach4.

Would you consider me for testing your card for Mach4?  I have sent you my email via PM.

Craig (Q*bert)


Ok, we called this Wired mach3 handwheel LHB04.

We have wireless new version WHB04B series, max support 6 Axis.

If you have friend like this.you can ask them to contact me. Thanks

Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: tkracht on February 27, 2017, 01:40:12 PM
Okay, I finally dived back into this after a long break.
I was plugging away at this back in September when my wife's water broke & it has taken me a while to work up the courage to pick up the pieces of my train of thought (just a locomotive and a caboose at this point).
The past week I have made a lot of progress & have something somewhat functional.
It's ugly, but it works. I can read all the needed data and display it on the Pendent. The MPG wheel works for XY&Z axis, FRO% & Spindle speed . and I have mapped a few buttons to do the basic functions I want (Estop, Start, Stop, pause, resume, zero axis, goto zero, increase MPG step amount, and regenerate toolpath)
The ugly is that the driver is unsigned and will require a few extra steps if it is to be installed on win10, I have zero interest in jumping through the hoops to be able to sign windows drivers so this will not be fixed. Also, there is an odd library dependency I'm currently trying to chase down, which can be worked around by installing Visual Studio with the Visual C++ windows SDK on the target pc.

I'm currently using this pendant on my machine and will gladly share the driver and compiled plug-in with anyone that asks for it and is willing to go through a few extra steps to install it.
message me for more info.

if you want the source, you will have to ask ArtSoft to broker an exchange as I signed an NDA with them and cannot share the code directly.

where is this driver/code available?  THANKS!
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on February 27, 2017, 07:35:35 PM
tkracht,
  I've been sending the driver to the users that request it via dropbox. I'll pm you with more details.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: spoocke on March 08, 2017, 10:06:46 AM
Just got mine in today.
Could you share the driver with me please.
Many thanks in advance.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: spoocke on March 08, 2017, 08:56:02 PM
 >:D >:D >:D
Asked for it.
Got it.
Installed it which is a breeze ( for a more advanced user )
hooked it up.
worked like a charm!!!

@mkullman  you totally rock dude!!!
Thanks
And i really bought this mpg cause i seen this post before.
So the guys that produce these should thank you cause they made a sale because of it.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on March 08, 2017, 10:00:44 PM
Glad to hear!
let me know if you can think of any improvements
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: spoocke on March 09, 2017, 08:01:13 AM
Are the macro's working ??
 ???
I did not test it.
Still would be nice if i could just go in that script and changed the macro for button 1 or 2.
would use it to find my X Y zero and my center hole with my touch probe :p
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on March 10, 2017, 12:03:38 AM
I have not yet had a use for the "macro" functions, so I have not tested them myself. But I did set "Macro 1" to regenerate the tool path and I did map the rest to Mach "input" signals.
I did verify that the signals are indeed being thrown in the Mach GUI though.
In theory you should be able to trigger Lua scripts from the signals. From there, you should be able to write any "macro" you want.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: spoocke on March 10, 2017, 03:16:27 AM
I have not yet had a use for the "macro" functions, so I have not tested them myself. But I did set "Macro 1" to regenerate the tool path and I did map the rest to Mach "input" signals.
I did verify that the signals are indeed being thrown in the Mach GUI though.
In theory you should be able to trigger Lua scripts from the signals. From there, you should be able to write any "macro" you want.

Awesome :p
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: lerska83 on April 09, 2017, 12:37:37 PM
Hi
Could I also get the driver?

You have done amazing work with it.

Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on April 09, 2017, 02:32:01 PM
I believe I've had enough users test this that I am comfortable posting the driver here for all.

The attached Zip file contains the latest version of the plugin. ENJOY ;D

if you have any questions or issues, feel free to pm me

moderators, if you believe I should post this under another section of the forum, please advise.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Tweakie.CNC on April 10, 2017, 01:39:52 AM
Excellent work Mkullman.

Tweakie.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: patton on May 14, 2017, 09:15:35 PM
Awesome work  mkullman.... I used this pendent with mach3 and it worked great.... thank you very much!!!
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: stratrascal on June 04, 2017, 06:25:59 PM
I would love to try that driver out.  I think XHC does not want you to be successful (As hard as they are trying to sell you their motion card :)) .  Let me know which hoops to jump through and I will do my best.

Thanks
Bart
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on June 04, 2017, 08:42:45 PM
I would love to try that driver out.  I think XHC does not want you to be successful (As hard as they are trying to sell you their motion card :)) .  Let me know which hoops to jump through and I will do my best.

Thanks
Bart

Thanks for your interest.
attachments in these forums are pretty easy to miss :P
I attached a .zip (https://www.machsupport.com/forum/index.php?action=dlattach;topic=31332.0;attach=46004) file to a post above (https://www.machsupport.com/forum/index.php/topic,31332.msg238915.html#msg238915) that contains the plugin and driver. Just download than follow the README.txt files.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: zarsss on October 09, 2017, 08:30:37 AM
Thank you for this brilliant software!
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: kimp on October 12, 2017, 10:14:05 PM
My pendant is on the way.  Please let me know where to find the driver.

Cheers,

Kim
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: zarsss on October 13, 2017, 09:15:01 AM
My pendant is on the way.  Please let me know where to find the driver.

Cheers,

Kim

Open your eyes, two posts above it is.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: McClean on November 20, 2017, 06:52:45 AM
Hi,

good work for this driver! I tested it and it works fine. But now i have a problem. Im using mach3 at the moment and i tried to go back to mach3 with the mpg. But it don't works. I uninstalled the driver and then reconnected the usb-stick. Windows installed the normal hid driver. But mach3 didnt work with mpg any more

What can i do? Some ideas?

Thanks,
Steffen
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on December 01, 2017, 12:08:43 AM
good work for this driver! I tested it and it works fine. But now i have a problem. Im using mach3 at the moment and i tried to go back to mach3 with the mpg. But it don't works. I uninstalled the driver and then reconnected the usb-stick. Windows installed the normal hid driver. But mach3 didnt work with mpg any more

 Sorry, I didn't anticipate someone reverting back to the generic driver and didn't try to run the mach3 driver after a driver rollback.
I'm not sure what is causing this issue and I will install mach3 here and see if i can replicate the issue.

which version of windows are you using?
does moving to another USB port change anything?
perhaps try using  Zadig (http://"http://zadig.akeo.ie") and experiment with the different winUSB drivers?

also, sorry for not responding right away, I didn't catch your post till just now. (need to check my notification settings)
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: McClean on December 01, 2017, 02:53:00 PM
Hi,

thank you very much! Yes i tried different things to get the mpg working with mach3 again.

Windows: Win10 pro, 64bit
Mach3: Latest Version

Tested:
- removed MPG from device manager, with "remove driver". The reconnected the USB-stick, windows installes mpg as HID again, but with "not migrated message". Not working in mach3
- used some other usb-ports. Not working
- used zadig, tested different settings. Not working

USB Device (devicemanager) says device redy, but:

Das Gerät USB\VID_10CE&PID_EB70\6&3b560980&0&3 wurde aufgrund einer teilweisen oder mehrdeutigen Übereinstimmung nicht migriert.
ID der letzten Geräteinstanz: USB\VID_0000&PID_0002\6&22bce1d6&0&3
Klassen-GUID: {36FC9E60-C465-11CF-8056-444553540000}
Speicherortpfad: PCIROOT(0)#PCI(1A00)#USBROOT(0)#USB(1)#USB(3)
Migrationsrang: 0xF000FFFFFFFF0103
Vorhanden: false
Status: 0xC0000719
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: RBeaubien on December 03, 2017, 08:53:18 PM
Its my understanding that MACH3 does NOT work on Win 10.  Is that not true?
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: McClean on December 03, 2017, 08:54:58 PM
Hi,

Mach3 works fine with Windows 10 - you just need a Motion Controller. Parallelport is not working

Steffen
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Zaidron on December 04, 2017, 03:18:03 AM
I have a CNC on order with Mach4 USB controller.
After many searches, currently the only MPGs that officially support Mach4 are by VistaCNC (and they don't support all the MPG functionality as in Mach3).

See the HB04 manufacturer's website: http://www.cdxhctech.com/html/eProduct/137.html

Since I don't have the Mach4 controller or the HB04 MPG, can anyone list the functions that currently work with mkullman's plugin?
Is it possible to configure macros for buttons like in the manufacturer's plugin?
Does the driver support the the more advanced model WHB04B?

mkullman, can you post the sources of your plugin and driver so we could all help expand it?
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on December 04, 2017, 07:00:01 PM
@Zaidron  See the attached PDF for button functions that work with this plugin. they are not perfect, but work well enough.
Macros are a different subject altogether, the "Macro" buttons are mapped to Mach "signals" which you can than write a lua script to handle.
how to do this is handled in other sections of the forum

Unfortunately, as much as I would like to, posting my source would violate the NDA I signed with Artsoft. Sorry, no can.

@McClean I didn't forget about you & am still working on your issue.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Toolaa on December 06, 2017, 08:45:17 PM
mkullman,  I have read this thread and I can see that you have put quite a bit of work into creating drivers for this hardware to work with Mach 4.  I was wondering if you have ever received this error while trying to install the USB Driver. 

this device cannot start. (code 10)

During the installation procedure described in the readme.txt fiile this error occurs at the end of Step 13.  When I attempt to test the driver using xhc mpg test.exe the program works but indicates that the device is not present or the driver is not loaded.

I have tried this on two different PC's using Windows 10 and both have been updated with the 2015 version and the latest Visual C++ runtime libraries. 

One more question about an odd behavior.  When I first plug in the HB04 as I am monitoring the devise driver setup screen I see two new HID's pop up.  Both have the PID_EB70 code.  I've tried to upadte the driver of both which didn't work as well as one or the other.

Thank you in advance for any insight you can provide which might help me resolve my hardware/software issue.

Regards,

John

Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on December 06, 2017, 11:57:32 PM
Toolaa,
The two devices popping up is normal, I'm not sure why but I see it on every machine I've installed the MPG on, I've just added it to the list of odd practices from the developers of the MPG.

Did you try both the x86 & the x64 versions of the driver?
Are you plugged into the same USB port that you installed it on?
are you using a USB 2.0 port, I never tested it with a USB 3.0 port(I think it should work there)?

Assuming the MPG isn't malfunctioning or some windows 10 "security" update isn't interfering with the driver, I cannot think of anything else that it could be.
I'll dust off my project files here and see if anything has changed with Windows that might be causing this issue. beyond that I'm at a loss.Under the hood, the driver itself is pretty straight forward. It is just an INI file that tells windows to use microsoft's own WINUSB driver and attaches a name to it. There isn't much that can go wrong.

Oh... which HB04 exactly are you using?
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: McClean on December 09, 2017, 12:53:33 AM
Hi mkullman,

you told us its not possible to release the driver sources because of an NDA. Would it be possible to release only the parts with the usb/hid code and how to access the mpg (sending coordinates and reading encoder/button events)?

Regards,
Steffen
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: RBeaubien on December 09, 2017, 12:57:07 AM
These idiots not releasing their API is STOOPID.  How are you supposed to create a community based core that creates necessary plugins for their product.   No wonder it is so hard to find any boards that support MACH4.  This fear of Chinese hacking has gone too far.  I tried to get access to it to write a driver for a new card and was basically told to pound sand.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on December 09, 2017, 03:36:26 AM
they do release the API, you just have to ask nicely and sign an NDA, just like many software companies out there that wish to protect their intellectual property.  They have to eat to...

As requested here is a link (http://"https://www.dropbox.com/s/hria3m455rt7h2k/Xhc%20MPG%20test.7z?dl=0") to the source of a test application I used to figure out the USB communications to the HB04, it contains no references to the API. half of it is plagiarized from somewhere but I don't remember where from.
sorry about the messy code (went through a lot of beer writing this and the plugin). have fun, hopefully it answers your questions.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: joeaverage on December 09, 2017, 03:50:02 AM
Hi,

Quote
No wonder it is so hard to find any boards that support MACH4.
Rubbish there are some great Mach4 products on the market, it seems that you don't want to pay for them.

Craig
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: RBeaubien on December 09, 2017, 04:03:00 AM
Rubbish.  I've already paid for $350 for a controller that is on its way back because of sub-standard drivers for MACH4 (WiXHC).  
Of the remaining < $500 controllers, they each have their cons as to why I don't want to use them.  I settled on the POKEYs57CNC, but the ribbon cable ports are atrocious.  I have a 32-bit 3D controller that runs Smoothieware firmware and they have a version designed for CNC that would do nicely.  I wanted to write a driver for the MACH4, but was subsequently denied.  I'm a software and firmware developer with over 30 years of experience and I'm quite certain I can make a plugin for that (or any other) board.  

And from what I can find, I can count the number of controllers < $500 on one hand (UC100/300, PDMX, POKEY, ESS, WiXHC).  If there are others, they are certainly hard to find.  Not exactly what I would call a diverse, well supported program.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on December 09, 2017, 04:09:22 AM
this is a discussion for another thread
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Peter Knell on December 10, 2017, 03:07:11 PM
Hi mkullman
Amazing work you have done for a lot of people thank you very much!
Question, i have no idea about programming etc but im thinking your driver would not work with XHCs new pendant as its wireless yes?
I need a pendant for Mach 4 and reviews of there new one look pretty good but only working with Mach 3 and the wireless would be handy. If this isnt possible i think i will use your driver and get the one you are using.
Thanks for any help :)
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Zaidron on December 10, 2017, 07:02:21 PM
mkullman,

I see from manufacturer's website that the drivers for LHB04 (wired) and WHB04-L (wireless) models are the same, so I bet your driver will also work with the wireless model.
Anyway, I appreciate your work and I'm willing to buy you the WHB04B model so you can adapt the plugin for it as well.
Product page: http://www.cdxhctech.com/html/eProduct/view_137_363.html

PM me if you are interested.

Notes:
1. Some info on how the XHC MPGs work is on the OpenXHC project (https://bitbucket.org/moonglow/openxhc)
2. Look at the manufacturer's home page http://www.cdxhctech.com/ they note that they provide DLL libraries to integrate some of their MPGs to custom Windows programs, maybe this can be used to write a new/better plugin for Mach4. (browse this download page, it's all here: http://www.cdxhctech.com/html/edownloads/226.html)
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on December 10, 2017, 08:13:05 PM
@Peter Knell
thanks for the kind remarks.
You are correct in assuming this driver does not work with the pictured pendant which is the XHC-WHB04B-4. However, it is not because of the wireless module. The newer XHC pendants use a different method for packing the binary data to/from the pendant. And yes, Zaidron, the LHB04 & WHB04 both work with this driver/plugin. (the wireless feature is handled in hardware and is totally transparent)
I have worked with another user to adapt my code to work with the WHB04B, but because I did not have the pendant in my hands, debugging was a nightmare (we exchanged well over 100 emails  :-\).
he ended up contacting Artsoft, signing NDA and finishing the development on his own. I never did hear wither he was successful. I just sent him an email asking if he succeed and if he is willing to share the result.

regarding your petition for reviews on other pendants, I request that you start a new thread for that so this one stays on topic.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Peter Knell on December 14, 2017, 01:36:24 PM
Thanks mkullman
Im sure a heap of users would love to hear from the guy you have been working with on this. I really need a pendant and im almost ready to pull the trigger on the one you have working but would love the wireless.
Not sure why XHC havent got there act together and released a Mach 4 one yet :(.
Anyway please let us know if your guy replys to your email. My email is Peter.r.knell@gmail.com.
And thanks again for your awesome work with the older XHC pendant.
Title: Xhc HB04 MPG Pendent with Mach4
Post by: Toolaa on December 15, 2017, 10:24:14 PM
Toolaa,
The two devices popping up is normal, I'm not sure why but I see it on every machine I've installed the MPG on, I've just added it to the list of odd practices from the developers of the MPG.

Did you try both the x86 & the x64 versions of the driver?
Are you plugged into the same USB port that you installed it on?
are you using a USB 2.0 port, I never tested it with a USB 3.0 port(I think it should work there)?

Assuming the MPG isn't malfunctioning or some windows 10 "security" update isn't interfering with the driver, I cannot think of anything else that it could be.
I'll dust off my project files here and see if anything has changed with Windows that might be causing this issue. beyond that I'm at a loss.Under the hood, the driver itself is pretty straight forward. It is just an INI file that tells windows to use microsoft's own WINUSB driver and attaches a name to it. There isn't much that can go wrong.

Oh... which HB04 exactly are you using?

mkullman,

Thanks for your reply.  I’ve been working quite long shifts the past week so this is my first chance to get back to solving this problem. 

I did try to install the x86 version of the driver, but it would install.  Only the x64 version would attempt to install.

Also I am trying to test in the same port that was used to try and install the driver.  This PC only has USB 2.0 ports.

Ive attached a photo of the error message.

(https://uploads.tapatalk-cdn.com/20171216/667e7055a9c6d60764ae9bcc23fefa20.jpg)

The model of my pendant is XHC LGB04

(https://uploads.tapatalk-cdn.com/20171216/c7801fe42e6112da0205fb8f7845dc64.jpg)
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: DeNoZZo on December 16, 2017, 03:38:13 PM
@Peter Knell
thanks for the kind remarks.
You are correct in assuming this driver does not work with the pictured pendant which is the XHC-WHB04B-4. However, it is not because of the wireless module. The newer XHC pendants use a different method for packing the binary data to/from the pendant. And yes, Zaidron, the LHB04 & WHB04 both work with this driver/plugin. (the wireless feature is handled in hardware and is totally transparent)
I have worked with another user to adapt my code to work with the WHB04B, but because I did not have the pendant in my hands, debugging was a nightmare (we exchanged well over 100 emails  :-\).
he ended up contacting Artsoft, signing NDA and finishing the development on his own. I never did hear wither he was successful. I just sent him an email asking if he succeed and if he is willing to share the result.

regarding your petition for reviews on other pendants, I request that you start a new thread for that so this one stays on topic.

I also would like to get in line for this! Just bought this pendant not fully understanding how if/how it would work with Mach4. Now I can't use it until the mfr or someone comes up with a driver. I can help with testing if needed
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: slvm on December 28, 2017, 07:48:49 AM
I believe I've had enough users test this that I am comfortable posting the driver here for all.

The attached Zip file contains the latest version of the plugin. ENJOY ;D

if you have any questions or issues, feel free to pm me

moderators, if you believe I should post this under another section of the forum, please advise.

God bless you Bro, and thanks for your work !!!
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: megaplow on January 07, 2018, 02:09:23 AM
Hey All,
I am trying to get my HB04 (wired) working with mach 3. I have tried several drivers but all I see is zeros like in
@Toolaa's post.

If you have a driver that is working for you please pass it along. I am on windows 10 running the latest mach3.

Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on January 07, 2018, 02:37:23 AM
If you have a driver that is working for you please pass it along. I am on windows 10 running the latest mach3.

This driver/plugin is for Mach4. XHC has a working driver/plugin for Mach3 that should work for you.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: megaplow on January 07, 2018, 12:16:19 PM
I am using the driver found off this page: http://www.cdxhctech.com/html/eProduct/view_402.html
The machine has been rebooted a few times, it feels there is no data from mach3 getting to pendant via usb2 and usb3 ports.



Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on January 08, 2018, 07:34:12 PM
so I took a closer look at their "driver"  and it is not a driver, it is a plugin. they are using the default HMI driver that comes with windows.
I attempted to do the same thing but had issues so I had to make a more explicit call to the WINUSB driver by making an INI file, telling windows which driver to use.

I am at a loss as to what the issue on your machine is because I cannot seem to duplicate the issue on any of my computers (Win7, Win8.1 & Win10).
it almost seems like windows is ignoring your request to uninstall the driver.

All I can think of is try using a windows restore point or maybe try installing the driver for the actual Shuttle-pro over my driver.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Peter Knell on January 25, 2018, 08:03:04 PM
mkullman, did the other user you were emailing get back to you about how he went with the XHC WHB04B?
If not im ready to pull the trigger on the older version in wireless and use your driver.
Thanks
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mcbride19 on February 24, 2018, 10:40:01 AM
mkullman.
Thanks a lot for your work, I've just received my WHB04B and it works well with your drivers.

just a question: when shut down the WHB04B start it again I must restart mach4 or else it doesn't work anymore, do you have a clue of what's going wrong ?

Thks

Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Peter Knell on February 25, 2018, 02:13:19 PM
Mcbride19 are you using the old version of the WHB04B (white and blue buttons) or the new version of the WHB04B (orange and blue buttons). I havent purchased yet but if you have it working i might get it. Thanks
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on February 26, 2018, 01:08:56 AM
hey guys, sorry i have been slow to reply. I'm in the process of building a house and have a hundred pot's on the fire.
@Peter Knell, Yes I did hear back from him. He said he has moved on to another job and did not keep any of the files from his previous workplace. again, if you message me, I'll send you what we had when we parted ways. we had it mostly working, there were just a few minor things left if i recall correctly.

@McBride, I have the same issue with the plugin running on my window's 7 machine. Mach refuses to fully shutdown for some reason and has to be shutdown via task manager. I've been poking at it for a while with no success.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mcbride19 on February 26, 2018, 01:18:23 AM
Don't worry for the "slow reply"  we are all having much more important thing to do ;)
You already made a fantastic work for us.

thks for the answer
good luck for the building ...
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Zaidron on March 19, 2018, 04:07:15 PM
@mcbride19
So the WHB04B also just works with mkullman's plugin and driver?
Does all buttons and functions of the pendant work?
Can you setup the macro buttons for it (macro 8,9,10)
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mcbride19 on March 21, 2018, 05:55:39 AM
Yes it works .
Not all the function are working but the moSt of it are working and as I can see Mkullman is still working on his plugin so we just have to be patient. ;)
For now this plugin is fantastic and far better than the xbox plugin  :p
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on March 24, 2018, 03:05:11 AM
er... I think there may be a bit of confusion here.
the driver linked to above should not work for the "B" variant.
it should only work for the WHB04 not the WHB04B
I do have a kludged driver for the WHB04B. I had to code it in the blind, because I don't have the pendent to be able to test it on. So it is kind of one of those "use at your own risk" things. in theory it should work, but if it opens a portal to Hades...  :-\ ...message me if you want to try the WHB04B driver.
While I'd love to be spending more time helping everyone get their XHC pendants working under Mach4, my life is a hurricane at the moment and I have very little time to play with this stuff.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mcbride19 on March 24, 2018, 03:17:39 AM
Sorry, yes there is a little confusion, i's the wired version that works with the driver , the WHB04B is the wireless version.And , of course, I have the wired version,
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on March 27, 2018, 12:14:46 AM
The wireless feature is handled in the hardware level and is entirely transparent. The driver is the same for the LHB04 (wired) and the WHB04 (wireless). IE. it works for both the wired and wireless versions of the HB04.
However, the WHB04B-4 and WHB04B-6 are entirely different and this driver/plugin will not work. IE. it does not work for any version of the HB04B
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: striplar on May 17, 2018, 06:14:32 AM
I've installed the driver with my wireless pendant version and most of the defined buttons do what they're supposed to do. However, the jogging doesn't appear to use the values that are set in the config for the increments. That wouldn't be such a problem except that I'm working in metric and the increments sometimes come out in metric, and at other times in imperial. It's not really usable as it is unfortunately.

Is there any way you can make this work in Metric and also use the values set in the config? If not, I'll have to buy a different MPG as I have no idea what it's going to do when I turn the handle.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: striplar on May 17, 2018, 06:42:44 AM
After a bit more testing, I think I can see what it's doing.

If you just launch Mach4 and turn on the pendant, if the X-axis is selected for example, one click of the handwheel moves it whatever the increment is set in the config in inches, regardless of whether the machine is set to run in Metric or Inch. So if the first entry in the table is 1 then it moves 25.4mm!
If you then press the selection button on the pendant to change the increment, then it seems to move in different amounts, although they are 10x too small. ie 100 moves 0.01mm not 0.1mm

So for the moment, I've set all the values in the config to 0.001 so at least it doesn't drive off a huge distance if I don't change the increment on the pendant. It looks like at the very least there needs to be a better initialisation of the first increment because it's undefined at the moment and frankly dangerous.

Ideally, it should just read from the config table and take note of whether it's metric or imperial.

Any improvement would be most welcome. I don't need any clever functions, just for the basic ones to be rock solid.
Thanks,
Roger
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Peter Knell on May 27, 2018, 02:26:02 PM
mkullman
Thanks so much for your driver. I finally got around to installing the wireless unit with your driver and it was easy as, nice clear instuctions!
The only problem i had was the Driver test.exe kept throughing errors but the pendant works so im stoked as i love it!
Did you ever figure out the bug causing the jog to be disabled onscreen without pressing MGP mode by any chance? Not that its a big deal! Thank you so much for your efforts! Love it!
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Toolaa on June 15, 2018, 11:08:35 PM
I've installed the driver with my wireless pendant version and most of the defined buttons do what they're supposed to do. However, the jogging doesn't appear to use the values that are set in the config for the increments. That wouldn't be such a problem except that I'm working in metric and the increments sometimes come out in metric, and at other times in imperial. It's not really usable as it is unfortunately.

Is there any way you can make this work in Metric and also use the values set in the config? If not, I'll have to buy a different MPG as I have no idea what it's going to do when I turn the handle.

It's been quite a while since I've been able to get back to home CNC projects but I was able to finally get the driver to install.  What was happening was that when I plugged in the HB04 I didnt realize that 4 devices were showing up in under the HID Section all with the device ID EB70.   Two were labeled "HID-Compliant-Vendor-Defined Device" these where the two devices that I was attempting to install the driver to.  What I failed to notice was that there were two other devices labeled "USB Input Device"  those also had the hardware ID EB70.  As soon as I tried to install the driver there, it worked as noted. 

Thanks again for creating this.

Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: DeNoZZo on June 20, 2018, 09:24:24 PM
What are you guys doing on the Mach side to get it working?

I got a driver installed, but I'm not sure how to test it. I've activated the plug in on mach, but I'm getting no movement with jogging.
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: striplar on July 30, 2018, 05:21:55 AM
If there isn't going to be any further development on the plugin, would you consider releasing the source so I can make some changes myself? At the moment it's unusable for my system due to the way it handles the jog increments (as detailed in earlier posts), something that I'm sure I can fix.
It's a shame to have the pendant and not be able to use it.
Thanks,
Roger
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: mkullman on July 30, 2018, 11:43:46 PM
So here is the deal.

I just started a new job and am still in the process of moving to another state.
My computer (with all the development files) is still in a wearhouse awaiting delivery to our new home, which we are still in the process of closing on.
Even if I had the develpment files and wanted to share them, I cannot.  I signed a non disclosure agreement with Artsoft in order to receive and use their API and therefore cannot share the source code as it refferences the API.

Since you seem confident that you can fix my plugin. I suggest you contact Artsoft and request the API, and perhaps write your own plugin. Even better, express your frustration to XHC for not supporting MACH 4.  Frankly I am getting tired of supporting thier product for free. I wrote this plugin for my machine which took me a long time to figure out. I was kind enough to share it and even went the extra mile to try to accomidate other versions of thier product. But right now I dont have the time, patience, or resources to be dealing with this right now.

Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: Zaidron on September 25, 2018, 03:25:05 AM
Notes about the current status of MPGs for Mach4:

1. I am using the XHC WHB04-L with mkullman's Mach4 driver - it works ok, still has bugs.
    XHC stopped production and discontinued this model.

2. The new model for Mach3 WHB04B-4 is 113USD directly from them - but we don't have a working driver for Mach4.

3. There are no other wireless USB MPGs on the market that I know of.

4. Soon, I will experiment with using a generic MPG with my Hicon Integra board and will update you how it works:
https://www.aliexpress.com/item/EU-ship-free-VAT-Emergency-stop-hand-wheel-Universal-CNC-Router-Hand-Wheel-4-Axis-MPG/32851570118.html (https://www.aliexpress.com/item/EU-ship-free-VAT-Emergency-stop-hand-wheel-Universal-CNC-Router-Hand-Wheel-4-Axis-MPG/32851570118.html)
It should also work with SmoothStepper:
https://shane.engineer/blog/making-a-generic-pendant-work-with-mach-4 (https://shane.engineer/blog/making-a-generic-pendant-work-with-mach-4)
XHC has some wireless generic MPGs, but prices are much higher, the most basic model BWGP is 227USD.

5. Does anyone has good experience with vistacnc usb wired MPGs for Mach4? I can't find any reviews for it.

Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: joeaverage on September 25, 2018, 08:03:56 AM
Hi,
I use a VistaCNC P1A USB pendant. I seem to recall having a bit of of a battle to get it installed and working correctly buts
its been fine ever since.

Craig
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: JaredP on December 04, 2018, 06:52:51 PM
I just picked up a WHB04B-4 not really understanding there was a driver difference.

Is there any update on the status of the driver for this wireless pendant?
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: EngelenH on July 31, 2019, 06:44:38 AM
Ah yes, just got one of these too...

Alas expected it to work with the shuttlepro plugin from artsoft (should have read forums).

Did anyone get this one to work ?
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: jpastor54 on February 08, 2020, 04:36:04 PM
Interested in driver for mach4 WHB04B-04 MPG. Available?
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: joeaverage on February 09, 2020, 02:32:06 AM
Hi,

Quote
Interested in driver for mach4 WHB04B-04 MPG. Available?

XHC don't or can't be bothered to make one. There are a couple of plugins written by users, how complete they are
is another question.

https://www.machsupport.com/forum/index.php?topic=37581.0 (https://www.machsupport.com/forum/index.php?topic=37581.0)

Craig
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: jfbusque on May 15, 2020, 08:15:17 PM
Hello, I was wondering if since some time someone has found a pilot for the WHB04B-4 XHC which works on mach4?       :D :D :D
Title: Re: Xhc HB04 MPG Pendent with Mach4
Post by: smurph on March 19, 2021, 01:38:08 AM
Build 4690 has support for the whb04b-4 and whb04b-6. 

Steve
Title: Re: Xhc HB04 MPG Pendent con Mach4
Post by: ralbertorg on March 20, 2021, 09:57:07 PM
Hello everyone, I am reprogramming a plugin that I found on the internet that is for the previous versions and I am adapting it to the new WHB04B-4 for Mach4 and most of the options work, if someone knows how to program in c ++ and wants to help it would be great.