Machsupport Forum

Mach Discussion => Mach4 General Discussion => Mach4 Plugins => Topic started by: Steffen_Engel on March 08, 2017, 07:35:48 AM

Title: Mach4 Plugin-Development
Post by: Steffen_Engel on March 08, 2017, 07:35:48 AM
Hi,

i have some Plugins developped for Mach3. I would like to do the transfer to Mach4 with starting to port the plugins.

How can I get a development tutorial or documentation? Couldn't find anything yet.

best regards,

Steffen
Title: Re: Mach4 Plugin-Development
Post by: smio on March 15, 2017, 04:00:08 AM
Hello,

i´m also would like to develope some plugins for mach4. Please give us an tutorial or manual.

thanks in advance! How can we change exiting M4PW/SIG files? let us know...

best regards,
Stefan
Title: Re: Mach4 Plugin-Development
Post by: Steffen_Engel on March 15, 2017, 04:41:36 AM
I learned you have to sign a non disclosure agreement with newfangled Solutions to get the SDK and documentation.

By the moment I'm waiting for it ;-)

Title: Re: Mach4 Plugin-Development
Post by: smio on March 15, 2017, 10:40:02 AM
Have a nice day! :)

I also have requested the SDK package!

many thanks!
Title: Re: Mach4 Plugin-Development
Post by: rhtuttle on March 15, 2017, 03:42:32 PM
Their standard policy is that they only provide that for hardware plugins.  Everything else you modify or create lua scripts.
Title: Re: Mach4 Plugin-Development
Post by: smio on March 16, 2017, 02:35:32 AM
Good Morning,

I would like to make my XHC WHB04-4 mpg pendent running in mach4.
Please help me!

mkullman has writen a Hardware Plugin for mach4, but only for XHC HB04 Pendent.

thanks for all help!

best regards,
Stefan

Title: Re: Mach4 Plugin-Development
Post by: jpastor54 on February 19, 2020, 12:08:49 AM
Looking for a Mach4 WHB04-4 Plugin as well...will keep in touch if one shows up.
Title: Re: Mach4 Plugin-Development
Post by: smurph on March 10, 2021, 09:44:37 PM
Ok guys, starting with build 4688, I have included a plugin that will handle the WHB04B-4 and WHB04B-6 XHC MPGs.  It will eventually support the older WHB04 but I haven't gotten one in yet to test with.

There are a lot post with erroneous model numbers, incomplete or otherwise, out there that was a huge source of confusion for me.  So to be clear, the MPG that this plugin supports looks like this:
(https://www.wixhc.cn/wp-content/uploads/2019/12/WHB04B.png)

Steve
Title: Re: Mach4 Plugin-Development
Post by: Cracked Wood Studio on August 14, 2021, 09:31:30 PM
Hey Steve, I have a WHB04B-4 that worked well in Mach3, Since I upgraded to Mach4, My pendant will not work at all. Any suggestions as to what or how I can get my pendant to work with Mach4?
Title: Re: Mach4 Plugin-Development
Post by: smurph on August 15, 2021, 12:05:16 AM
Mach builds after 4688 have the plugin.

Steve
Title: Re: Mach4 Plugin-Development
Post by: Cracked Wood Studio on August 15, 2021, 11:19:44 AM
Thanks for the reply Steve! Where can I get the 4688 build?
Any link(s) that I can try?
Thanks,
Darren
Title: Re: Mach4 Plugin-Development
Post by: Stuart on August 15, 2021, 11:34:25 AM
here you go
http://www.machsupport.com/ftp/Mach4/DevlopmentVersions/
Title: Re: Mach4 Plugin-Development
Post by: Cracked Wood Studio on August 15, 2021, 12:39:04 PM
Thank you Steve, I will look at all those files to find a build greater than 4688.
Hope this will get my HB04B-mpg operating!
Darren
Title: Re: Mach4 Plugin-Development
Post by: Cracked Wood Studio on August 15, 2021, 03:43:00 PM
Quick Update!
I have my whbo4b mpg finally working with mach4, Thank you Steve.
I can now enjoy using my pendant with my cnc6090. Your the best and keep up the great work….too bad the manufacture of the mpg develop an update. But NO! They informed me if I ordered 200 mpg’S that they would build an mpg for mach4, wow…what a con they are. Anyways, Thanks Steve, All the best.
Title: Re: Mach4 Plugin-Development
Post by: smurph on August 15, 2021, 05:54:43 PM
I'm glad you are up and running!  I still have to implement a feature or two, but the the plugin seems to work nicely. 

Oh, you don't have to update to the latest Mach build to use the plugin.  Just install the latest build into a different directory (not installing any profiles) and just copy the mxXhcMpg files out of the plugins directory from the new build to your old build.  The plugin will be backward compatible with the older builds unless you are using a 10 year old build of Mach 4.  :) 

Steve
Title: Re: Mach4 Plugin-Development
Post by: LightGuy on September 22, 2021, 12:18:39 AM
I'm a new user of the software (3 weeks) and running version 4.2.0.4517 for an AVID CNC. The latest version on the website is 4612. Just curious on how to get the plugin.
Title: Re: Mach4 Plugin-Development
Post by: smurph on September 22, 2021, 03:43:13 PM
here you go
http://www.machsupport.com/ftp/Mach4/DevlopmentVersions/
Oh, you don't have to update to the latest Mach build to use the plugin.  Just install the latest build into a different directory (not installing any profiles) and just copy the mxXhcMpg files out of the plugins directory from the new build to your old build.  The plugin will be backward compatible with the older builds unless you are using a 10 year old build of Mach 4.  :) 

Steve
Title: Re: Mach4 Plugin-Development
Post by: LightGuy on September 22, 2021, 09:49:54 PM
I downloaded the latest development version and installed it to a dummy directory on a different PC I copied the two plugin files and added them to my production PC in the plugin folder. I deleted the driver from the device manager as I was trying to use a different version of the XHC that was not working and let windows re-discover the USB adapter. Fired up Mach4 on my production machine and enabled the plugin. Restarted Mach4 and it works!! This is fantastic! As mentioned somewhere else, the incremental mode doesn't work so the resolution isn't the greatest but it accomplishes 99% of everything I was looking for. We have a 5' x 10' Pro version of AVID CNC with the option of plasma on one end and the spindle on the other. We also cut some very large parts and having the XCH really allows me to safely get around the table and check setups. Thanks for providing the information and looking forward to applying macros to some of the additional buttons! Very Grateful and Thank You!
Title: Re: Mach4 Plugin-Development
Post by: jrbloom on September 30, 2021, 01:45:52 PM
Aha. I just posted to a different thread regarding Step (incremental) mode not working.

I see this too. Is that a problem with the firmware or a gribbly with the plugin? In other words - is it something we'll just have to live with?

I'm so pleased to get ANY functionality working for this pendant - I'm also using an Avid, and these machines are so large that a cable pendant just isn't practical. I cant read the mach4 dro's from the back of the machine so a handheld readout is a life-saver.

Thanks for jumping in here Steve. Not good that you end up supporting someone elses hardware like this, but really appreciated 🙂

Jon
Title: Re: Mach4 Plugin-Development
Post by: jrbloom on September 30, 2021, 02:29:12 PM
Steve replied in the other topic thread here:
   https://www.machsupport.com/forum/index.php?topic=37581.msg288936#msg288936 (https://www.machsupport.com/forum/index.php?topic=37581.msg288936#msg288936)

that build 4746 might be better for Step mode. I just tried it and it seems to work perfectly  :)

So, might be better to avoid the later builds for now.
Title: Re: Mach4 Plugin-Development
Post by: rene blanchette on April 17, 2022, 06:27:18 PM
ou est la version 4868
Title: Re: Mach4 Plugin-Development
Post by: Lucid_moments on April 18, 2022, 07:43:00 PM
http://www.machsupport.com/ftp/Mach4/DevlopmentVersions/

download MAch4 Hobby dated 2021 or later. I found build number 4839. But you might want to install in another computer if all you want is the mcXhcMpg.m4pw, and mcXhcMpg.sig plugin files
Title: Re: Mach4 Plugin-Development
Post by: rene blanchette on April 22, 2022, 04:43:36 PM
Mach builds after 4688 have the plugin.

Steve

my whb04-4 not work with mach4 i have version 4839 and not detected my mpg
Title: Re: Mach4 Plugin-Development
Post by: Lucid_moments on April 24, 2022, 10:47:59 AM
That is why I bought a Shuttlepro. The XHC pendant worked so well in Mach3  :P
Title: Re: Mach4 Plugin-Development
Post by: Mike Burch on November 12, 2022, 07:23:33 PM
Speaking of plugin's.  Is there any way to decompile a plugin?  That is to see how it works.  I'm asking this because the plugin for the UC 100 motion controller is not being detected by Mach 4.  As I understand it CNC drive and Newfangled are competitors and I thought there might be a coded reason that Mach 4 is not picking this up.   And no, I have no programming experience at all.  Thank you.
Title: Re: Mach4 Plugin-Development
Post by: joeaverage on November 13, 2022, 03:28:04 PM
Hi,

Quote
Is there any way to decompile a plugin?

No. You could probably decompose it to assembly language....but assembly language is a far cry from the C source code, even an extremely clever programmer will not be able to generate
the source code from the assembly decomposition.

The plugin for a UC100 is written and maintained by CNCdrive. They must have signed a Non Disclosure Agreement with NFS so that NFS would provide the inside details of how
Mach4 works so CNCDrive can in turn write a working plugin.

NFS and CNCDrive are competitiors is the sense that Mach4 and UCCNC are being sold to the same market. NFS is however keen that CNCDrive write a Mach4 compatible plugin for their
UCnnn devices, including the UC100. I can't imagine any reason that NFS would have to construct Mach4 NOT to operate with any UCnnn device. It is after all to NFS's advantage that
as many different motion controllers operate with Mach4 and thereby secure as many sale oppurtunities as possible.

I suspect that as NFS has released the latest builds that some detail about the build prevents the UC100 plugin from running. I don't imagine its deliberate for the reason I mentioned above,
indeed I would imagine that NFS would try to keep successive builds such that all manufacturers plugins would continue to operate. Having said that from time to time an alteration
of Mach4 causes an issue with a plugin.


I use an Ethernet SmoothStepper and there have been occasions where a new build of Mach4 has caused the ESS plugin to misbehave. It is Warp9's responsibility to alter their Mach4 plugin
to suit not the other way around. Having said that NFS have, according to Warp9's tech guy, Andy, always tried to assist Warp9's evolution of their plugin.

I can well imagine that CNCDrive are focused on their customers, namely UCCNC users. Their secondary customers whom have bought hardware only, like a UC100, and using
Mach software are a lesser priority.

May I suggest asking CNCDrive which build of Mach4 their plugin was designed to work with. Its more likely that if you are trying to use the latest development build of Mach4 then you
may have problems when the plugin was developed to work with thw current stable release version.

Craig