Loading ...
Sorry, an error occurred while loading the content.

How can I get gcode moving in mach3 with my plugin?

Expand Messages
  • hengdongtanyi
    My simple plugin is most the same like ncPod. My development environment is Visual C++ 2008,mach3 version 3.043.000,SDK version 2.62. First,in the
    Message 1 of 3 , Aug 30 6:17 PM
    • 0 Attachment
      My simple plugin is most the same like ncPod.
      My development environment is Visual C++ 2008,mach3 version 3.043.000,SDK version 2.62.
      First,in the "InitControl()" function,I initial the gcode moveMent varialbes.It is like this,
      Engine->Homing = false;
      MainPlanner->ExBufferHi = 350;
      MainPlanner->ExTime = 0.0004;// 0.00085;
      MainPlanner->ExternalType = EX_VMS; //EX_COMMAND; //;

      for( int x = 0; x < 7; x++ )
      MainPlanner->ExternalPulseRates[x] = 3000000;
      .
      Second,in my "Update()" function, which is setting up to be executed 10hz in a loop, I do gcode moving like this,
      switch( MainPlanner->ExternalType )
      {
      case ( EX_COMMAND): DoCommandGCode(); break;
      case ( EX_VMS): Do4MsGCode(); break;
      case ( EX_DDA): break;
      }.
      Third, in the mach3 mainframe, I clicked "Load G-code"->"Reset"->"X/Y/Z/A"->"GoToZero"->"Cycle Start", but it's likely not running at all, the gcode dislay the line only at first. I do the debugging mode in vs2008, where the "Engine->TrajHead" var is not changed at all time.Why?Maybe some movement relative variables not initialized in my plugin?Anyone helps me,many thanks.
    • Brian Barker
      If you contact me off list I may be able to send you some other source code to jump start you :)
      Message 2 of 3 , Aug 31 2:34 AM
      • 0 Attachment
        If you contact me off list I may be able to send you some other source
        code to jump start you :)

        On 8/30/2011 9:17 PM, hengdongtanyi wrote:
        > My simple plugin is most the same like ncPod.
        > My development environment is Visual C++ 2008,mach3 version 3.043.000,SDK version 2.62.
        > First,in the "InitControl()" function,I initial the gcode moveMent varialbes.It is like this,
        > Engine->Homing = false;
        > MainPlanner->ExBufferHi = 350;
        > MainPlanner->ExTime = 0.0004;// 0.00085;
        > MainPlanner->ExternalType = EX_VMS; //EX_COMMAND; //;
        >
        > for( int x = 0; x< 7; x++ )
        > MainPlanner->ExternalPulseRates[x] = 3000000;
        > .
        > Second,in my "Update()" function, which is setting up to be executed 10hz in a loop, I do gcode moving like this,
        > switch( MainPlanner->ExternalType )
        > {
        > case ( EX_COMMAND): DoCommandGCode(); break;
        > case ( EX_VMS): Do4MsGCode(); break;
        > case ( EX_DDA): break;
        > }.
        > Third, in the mach3 mainframe, I clicked "Load G-code"->"Reset"->"X/Y/Z/A"->"GoToZero"->"Cycle Start", but it's likely not running at all, the gcode dislay the line only at first. I do the debugging mode in vs2008, where the "Engine->TrajHead" var is not changed at all time.Why?Maybe some movement relative variables not initialized in my plugin?Anyone helps me,many thanks.
        >
        >
      • hengdongtanyi
        Message has been send to your email, waiting for your reply.
        Message 3 of 3 , Aug 31 7:27 PM
        • 0 Attachment
          Message has been send to your email, waiting for your reply.
        Your message has been successfully submitted and would be delivered to recipients shortly.