584,854 active members*
4,180 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2015
    Posts
    7

    KFlopWebNC M commands and 8 axis control

    Hey Tom,

    I have just been experiencing a problem in KFlopWebNC. The M-commands 3 through 9 work correctly but 100 through 119 do not seem to be detected (or executed) while running a G Code. Any ideas?

    I was also wondering how I could map G-Code commands to multiple axis. For this application I am using all 8 kmotion channels but two of these channels (6 and 7) are mirrors of other channels (4 and 5). This would be easy enough by itself but I also need to be able to stop and start these axis individually (assuming channels 4 and 6 are both the B axis I want to be able to turn off 6 whilst leaving 4 on and vice versa). I have tried disabling and re-enabling the channels but this causes an immediate abort of the G Code while using Kmotion.

    Thanks for all the help so far, I think I'm close to finishing my app!
    Mike

  2. #2
    Join Date
    Jan 2015
    Posts
    7

    Re: KFlopWebNC M commands and 8 axis control

    Just a quick update.

    Through debugging the M command functionality I have found that I am successfully calling the function

    _Controller.CoordMotion.Interpreter.SetMcodeAction (
    command.Index, command.Type, p0, p1, p2, p3, p4, sdata);

    which sets all of the M commands, M3-M9 which function correctly are set, as well as M100-M119, which do not work during running of the G Code.

    I'm assuming that in order to call the M command with the name M100, which is the name recorded in the InterpreterData.xml file, I can simply have a G Code line M100? I'm not really sure what I'm doing wrong currently.

    I have updated the M command in the KFlopWebNC settings menu, does it need to also be updated elsewhere?

    Thanks
    Mike

  3. #3
    Join Date
    May 2006
    Posts
    4043

    Re: KFlopWebNC M commands and 8 axis control

    Hi Mike,

    Sorry for the delay it took a while to find the bug. I think the issue is that the Actions for M3-M9, User Buttons, M100-M119, and Specials are all packed into an array. The M100 Actions start at Index 21 not Index 100.

    In file DeviceInteropHandler Interpreter.cs change this code:


    Code:
                    if (init)
                    {
                        _Controller.CoordMotion.Interpreter.SetMcodeAction(
                            command.Index, command.Type, p0, p1, p2, p3, p4, sdata);
                    }
    to this:
    Code:
                    if (init)
                    {
                        int MCODE_ACTIONS_M100_OFFSET = 21;  // start of M100 Actions Packed into Array
                        int ArrayIndex = command.Index;
                        if (ArrayIndex >= 100 && ArrayIndex <= 119) ArrayIndex += MCODE_ACTIONS_M100_OFFSET - 100; 
                        _Controller.CoordMotion.Interpreter.SetMcodeAction(
                            ArrayIndex, command.Type, p0, p1, p2, p3, p4, sdata);
                    }
    HTH
    Regards
    TK
    http://dynomotion.com

  4. #4
    Join Date
    Jan 2015
    Posts
    7

    Re: KFlopWebNC M commands and 8 axis control

    Thanks Tom! worked flawlessly

Similar Threads

  1. KFlopWebNC pause problem and sub-programs in Kmotion
    By MikeMz3 in forum Dynomotion/Kflop/Kanalog
    Replies: 3
    Last Post: 05-11-2021, 08:47 PM
  2. U and V axis commands in Gcode.
    By AzzA2032 in forum Dynomotion/Kflop/Kanalog
    Replies: 2
    Last Post: 12-04-2014, 07:42 AM
  3. Replies: 7
    Last Post: 07-14-2014, 11:11 AM
  4. Dos Commands
    By LYN BYRD in forum Milltronics
    Replies: 12
    Last Post: 08-01-2011, 04:21 PM
  5. Thread commands on 6T control
    By Ricardo Guedes in forum Fanuc
    Replies: 2
    Last Post: 02-03-2006, 07:21 AM

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
  •