Hello Guest it is March 28, 2024, 01:52:42 PM

Author Topic: Mach3 Plugin Tutorial Document and Prototype File Set  (Read 139677 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #90 on: April 05, 2009, 02:50:04 PM »
I suspect it must vary or something, I tried your code in mine, by calling the cleanup from my notivy, and it crashed mach....

so, back to the drawing board..........

scott

Hello Scott,

What msg is myNotify() getting when Mach3 is shutting down?

If the plugin is enabled then Mach3 will call also myCleanUp(). So if you have already cleaned up with myNotfiy() then you need to be sure that myCleanUp() does not cleanup again. I set a flag to true when I create the plugin dialog box. When myCleanUp() cleans up it first tests this flag to see if there is something to clean up. If so, then it does the cleanup job then clears this flag.

Tom
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #91 on: April 05, 2009, 03:06:57 PM »
Hi,

Since the notification ALWAYS gets called I simply stopped using myCleanup all together.

See the Yahoo group for a prior discussion, particularly:

http://groups.yahoo.com/group/mach1mach2cnc/message/95280

-James

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #92 on: May 15, 2009, 11:19:11 AM »
Hey Guys, just as a side note:  I got the Modless windows closing in Mach MAD, by using both of the notifications in MyNotify().

#define SHUTDOWN      14 // Undocumented notification
#define JAMESSHUTDOWN      0x12000e  // Undocumented notification

But out of about 112 users so far, I have 2 that STill get the crash, I suspect that there is a 3rd notification that they must get on thier computers. I had to have them "down grade" back to the previous version since I had no way to see what message ID that thier computers where throwing.

void   myNotify ( int ID)
{
   if ((ID == SHUTDOWN)||(ID == JAMESSHUTDOWN))
   {   
      //AfxMessageBox("ShutDown called.");
      
      if (NULL != dlg) {

         dlg->DestroyWindow();         
         delete dlg;
         dlg = NULL;
      }

      mach3CWnd.Detach();      
   }

} //myNotify

//scott
fun times
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #93 on: February 21, 2010, 10:17:31 PM »
            With the help of the tutorial I think my problem will be solved finally. All the suggestions and details I got in this discussion are really great. Now I can do the prototype perfectly with no mistakes.
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #94 on: September 18, 2011, 12:00:29 PM »
This thread seems to have petered out, is it carried on elswhere?
I just got hold of VS2008 so am hoping to use it for a plug-in?
Nosmo.
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #95 on: September 18, 2011, 12:06:29 PM »
Hi,

There is another thread about VC2008:

http://www.machsupport.com/forum/index.php/topic,10733.0.html

But I personally would use 2003 - it is native for Mach3 plugins.  There are serious issues with MFC versions that the 2008 stuff sidesteps.  If you want to use this tutorial you really need to use 2003.

Just my two cents.

-James Leonard
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #96 on: September 20, 2011, 03:53:14 AM »
I use VC2010 Express with no problem with my motion plugin. But rather with .NET then MFC. Just installed DDK to get ATL support ( needed when callling some Mach functions).

Jarek
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #97 on: December 16, 2013, 04:25:27 PM »
Hi there
I know this is an old thread, but the informations are helpful. But I have a problem with include files.
The manual on page one has include files "mach3dro.h" and "mach3button.h" in the sample code. I read in two replies, that the files are in the zip file on page one. but the needed files are NOT in the zip file.

I have downloades the last sdk. I tested dro2.h and mach1button.h is this the right way?
can onybody help me?

ks
« Last Edit: December 16, 2013, 04:37:20 PM by scorpi »
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #98 on: December 26, 2013, 05:44:14 AM »
thank you for your active participation. has done
Re: Mach3 Plugin Tutorial Document and Prototype File Set
« Reply #99 on: May 31, 2014, 01:29:57 PM »
Hi,

The tutorial was really helpful for me but now I want to make a plugin to control my controller board via the serial port.
My main question is: how do I get a function to get called every time the Mach3 sends a pulse to some axis? This function should be able to know which axis is changing, so it can send a certain character via rs232 to the controller board which will control the proper motor.

I described the plugin here: http://www.machsupport.com/forum/index.php?topic=27232.new;topicseen#new

I've read the posts in this thread but I'm not sure how to do this. should I use myNotify() or what?

Any help will be appreciated!!