Hello Guest it is April 19, 2024, 08:51:15 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rdpdo

Pages: 1 2 »
1
Post Processors / Mach3 postprocessor for Mastercam X6
« on: December 21, 2011, 04:32:00 AM »
Hi,

DO you have postprocessor gor mastercam X6 please ?

Thanks !

2
Ok thanks you I'll send a message to andrew.

3
Hello,

I am using compensation on XY axis with the formula for squarness compensation :

 X = X
 Y = Y + (X*0.005)
 Z = Z

With this setup, when I do a MDI "G0 Z1", only the Z axis is moving. It's ok...

Unfortenalty, when i do a MDI "G31 Z-0.5 F10" to probe a point, the Z axis AND the Y axis are moving... :(

When I disable formula, I havent this problem...

Is is normal or a bug ?

Thanks for your help.

Regard.

4
Thanks you ;)


5
Hi,

I saw somewhere that it is possible to compensate the squarness under mach3 using formula :

Quote
For example, if your Y axis is tilted to the right by 0.003"/inch, you could enter a formula like this:

X = X - (Y * 0.003)
Y = Y

On a "straight" machine, when you tell Mach3 to move from Y0.000 to Y1.000, Y will move 1.000", and X will not move at all.  On this hypothetical crooked machine, that same move will cause Y to move 1.000", but X will also move to the right, off-true, by 0.003", due to the error in the machine.  Entering the above formula un-does this error.  So, now when you command a move from Y0.000 to Y1.000, Mach will actually do a two-axis move, from X0.000, Y0.000 to X-0.003, Y1.000, "un-doing" the error in the machine.

My question is : Does this compensation methode work with all sort of form (circle, ....) or only for rectangular forms ?

Thanks you for your help.
Regards.

6
hello,

Currently, for milling a non flat surface, I do probing on my non flat surface with a plugin, that give me XYZ file. Then, I import it into Solidworks for creating a surface. Under mastercam, i use the function PROJECT to project the ideal toolpath on my surface created uner solidworks and I use the result to mill the non flat surface under mach3.

That works perfectly.

But is there a way to make mach3 automaticly project a toolpath on the probing result of the non flat surface, that is to say no using solidworks never mastercam project function ?

Thanks you for your help. Regards.

PS : Or perhaps there is a plugin for doing this...

7
Ok, I do this and it works :

UINT ProcessFindMach3(LPVOID param)
{
   do {
      EnumWindows(EnumWindowsProc2, NULL);
   }while(mach3Wnd==NULL);
   MachWindowFound = true;
   return 0;
}

And I create the Dlg in MyUpdate :

void myUpdate()

{
   // DbgMsg(("myUpdate entry"));

   if (MachWindowFound == true)
   {
      MachWindowFound = false;
      CreateDlgOutside();
   }



   // DbgMsg(("myUpdate exit"));
}

void CreateDlgOutside(void)
{
   mach3CWnd.Attach(mach3Wnd);
   dlg = new CProbeDlg;
   dlg->Create(IDD_DIALOG_CONFIG,&mach3CWnd);
   static bool menued = false;
    if( !menued)
    {
        //" Startup of Menu handler"
        menued = true;
      if (mach3Wnd != NULL)
      {

         CMenu *menu = mach3CWnd.GetMenu();
         HMENU hSubmenu = CreatePopupMenu();
         int pos = FindMenuItem3(menu,"PlugIn Control");
         //here we can add menu items to MAch3's menu..
         int x = pos;
         HMENU control = GetSubMenu( menu->m_hMenu, pos);
         InsertMenu ( control, -1, MF_BYPOSITION, RangeStart , _T("Probe") );
         mach3CWnd.DrawMenuBar();
      }
   }
}

8
Sorry, it is not correct because we cannot create a Dlg in a thread... So I must create the dlg outside the thread...

THere is no notify when mach3 is completly loaded ??

9
Resolved

10
Yes ! I got it running :)

This is what I've done :
On MyInitControl I initialise RangeStar :

void myInitControl()
{
   RangeStart  = GetMenuRange( 1 );
}


On MyPostInit I call a thread that will search for MAch3 windows while mach3 is loading. When mach3 is found, it add the menu item :


void myPostInitControl()
{
   AfxBeginThread(ProcessFindMach3, NULL);
}

The code for my thred is :

UINT  ProcessFindMach3(LPVOID param)
{
   do {
      EnumWindows(EnumWindowsProc2, NULL);
   }while(mach3Wnd==NULL);

   mach3CWnd.Attach(mach3Wnd);
   dlg = new CProbeDlg;
   dlg->Create(IDD_DIALOG_CONFIG,&mach3CWnd);

   
   static bool menued = false;
    if( !menued)
    {
        //" Startup of Menu handler"
        menued = true;
      if (mach3Wnd != NULL)
      {

         CMenu *menu = mach3CWnd.GetMenu();
         HMENU hSubmenu = CreatePopupMenu();
         int pos = FindMenuItem3(menu,"PlugIn Control");
         //here we can add menu items to MAch3's menu..
         int x = pos;
         HMENU control = GetSubMenu( menu->m_hMenu, pos);
         InsertMenu ( control, -1, MF_BYPOSITION, RangeStart , _T("Probe") );
         mach3CWnd.DrawMenuBar();
      }
   }
   return 1;
}

My Callback routine :

BOOL CALLBACK EnumWindowsProc2(HWND hWnd, LPARAM lParam)
{
   char String[255];

   if (!hWnd)
      return TRUE;      // Not a window
   if (!::IsWindowVisible(hWnd))
      return TRUE;      // Not visible
   if (!SendMessage(hWnd, WM_GETTEXT, sizeof(String), (LPARAM)String))
      return TRUE;      // No window title

   GetWindowText(hWnd,String,0);
   CString toto(String);
   if (toto.Find("Mach3 CNC",0) !=-1)
   {
      mach3Wnd=hWnd;
      return 1;
   }
   
   return TRUE;
}

And FinWindow :

int FindMenuItem3(CMenu* Menu, LPCTSTR MenuString)
{
   ASSERT(Menu);
   ASSERT(::IsMenu(Menu->GetSafeHmenu()));

   int count = Menu->GetMenuItemCount();
   for (int i = 0; i < count; i++)
   {
      CString str;
      if (Menu->GetMenuString(i, str, MF_BYPOSITION) &&
         (strcmp(str, MenuString) == 0))
         return i;
   }

   return -1;
}


I have also Add the notify routine ion my .cpp:

extern void myNotify(int ID);

extern "C" __declspec(dllexport) void Notify(int ID)

{
   AFX_MANAGE_STATE(AfxGetStaticModuleState());
   myNotify(ID);

   //Called when reset is pressed, at end of actual reset commend in Mach3.
   //Check the Engine.Estop variable to see if we have reset or not..
}

And in MyNotify I got the message ID when I click on menu item, so I call My Plugin :

void myNotify(int ID)
{
if (ID == RangeStar)
{
....
}
}

Pages: 1 2 »