586,494 active members*
2,629 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Posts
    1730

    Red face Kmotioncnc vs MACH3 Homing Flags

    Tom,

    After much experimentation I finally figured out that Mach3 uses Persist.userdata[5] to store the requested homing flags. However, in KmotionCNC it uses Persist.userdata[20] to hold the requested homing flags.

    Is there anyway in our C-programs to determine if MACH3 is the caller o KMOTIONCNC? I know I can modify my homing routines to use the correct flags and rename them for their respective applications. It would be cleaner to have one homing routine that would work for either application. Let me know if that is possible. Thanks


    Russ

  2. #2
    Join Date
    May 2006
    Posts
    4047

    Re: Kmotioncnc vs MACH3 Homing Flags

    Hi Russ,

    KMotionCNC doesn't have any "Homing Flags". Usually with KMotionCNC a User Button is assigned to call a C Program that will always home everything. This is unlike Mach3 that may make multiple calls and specifies each time which axes to be homed.

    The Persist Variable to be used is programmable in both Mach3 (Config | Plugins | Dynomotion | Home | Var) and in KMotionCNC (Tool Setup | User Buttons | Var). So you can make them the same if you wish.

    KMotionCNC doesn't put "flags" into the Variable. Rather for User Buttons it puts the "Action Number" into the Variable. For User buttons this will be a number from 11-20 depending on which button has been assigned for Homing. So I suppose one solution would be to use the Mach3 Homing C Program but add a test for the Variable being 12 (for the second KMotionCNC User Button) and if it is 12 then force the flags to 7 to home XYZ. You may also want to reorder the flags tests in the C Program so that when all axes are to be homed at once it happens in your desired order.

    Another option might be to use C #include statements to include the same homing code into different C Programs. This will involve a few files but will allow you to make any changes for example to the Y axis homing technique in one place and automatically be applied for both applications.

    HTH
    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Jun 2005
    Posts
    1730

    Re: Kmotioncnc vs MACH3 Homing Flags

    Tom,

    Thanks for your reply. I do use the user button in KMotionCNC as you describe. My homing routine is a slightly modified version of the HomeMM_7.c which is supplied with the Kmotion bundle. That program uses the following define for the homing flags? This routine does work for KMotionCNC, and also work for MACH3 by using Persist.Data[5] instead of Persist.Data[20], this is what drove my questions.

    #define REQUESTED_HOME_AXIS_FLAGS 20

    void LoadUserData(void)
    {
    persist.UserData[REQUESTED_HOME_AXIS_FLAGS]=0;


    Russ

  4. #4
    Join Date
    May 2006
    Posts
    4047

    Re: Kmotioncnc vs MACH3 Homing Flags

    Hi Russ,

    HomeMM_XX.c was mainly written to allow special PC Host Programs to configure most any manner of homing. It can also be hard coded to perform any type of homing. We would need to look at how you did everything in the Mach3 Dynomotion Plugin Configuration, KMotionCNC, and the HomeMM_7.c program.

    As stated in the previous email KMotionCNC doesn't support any concept of Homing Flags but it is probably possible to determine the program is being invoked by KMotionCNC and then simply home all axes.

    You have complete flexibility to configure Mach3, KMotionCNC, and HomeMM_XX.c to use any, the same, or different Vars of your choice.

    Regards
    TK
    http://dynomotion.com

Similar Threads

  1. Is anyone using KmotionCNC instead of Mach3?
    By John Coloccia in forum Dynomotion/Kflop/Kanalog
    Replies: 5
    Last Post: 02-22-2013, 08:11 PM
  2. Another Mach3 homing issue !
    By mels33 in forum Mach Mill
    Replies: 4
    Last Post: 02-13-2013, 04:55 PM
  3. Mach3/Kflop - Homing
    By Snipes44 in forum Dynomotion/Kflop/Kanalog
    Replies: 5
    Last Post: 10-18-2012, 06:06 AM
  4. Homing Mach3
    By omboli in forum Mach Software (ArtSoft software)
    Replies: 3
    Last Post: 08-10-2012, 12:30 PM
  5. Mach3 - Homing Problems
    By rc123456 in forum Mach Software (ArtSoft software)
    Replies: 3
    Last Post: 02-19-2010, 02:58 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •