585,683 active members*
4,861 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > KFlopWebNC pause problem and sub-programs in Kmotion
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2015
    Posts
    7

    KFlopWebNC pause problem and sub-programs in Kmotion

    Hi,

    I just wanted to quickly ask if it was possible to call sub-programs (I need to call the sub routine from a different file) using the G-Code tab in KMotion. I am very inexperienced with G-Codes and I have just been trying to write a very basic G-Code that calls a sub-program a number of times and passes it a number. The sub-program performs a small task and then returns to the main file. I have searched and found numerous methods of calling sub-programs but none have functioned correctly whilst using KMotion and I think I must be missing something obvious.

    Thanks,
    Mike

  2. #2
    Join Date
    May 2006
    Posts
    4045

    Re: KFlopWebNC pause problem and sub-programs in Kmotion

    Hi Mike,

    I couldn't duplicate the KFLOPWebNC Feedhold issue, but it looks like you removed that question so I assume it no longer is a problem. I would love to see your app.

    Regarding KMotionCNC Subroutines: unfortunately calls to other files are not supported. The subroutine must be within the same file. Here is the included SubroutineWithConditionals.ngc example which shows how to call a subroutine conditionally and multiple times.

    Code:
    G20
    #100 = 5
    
    (examples of logical operations)
    (result is 1 if condition is true)
    (result is 0 if condition is false)
    
    #101 = [#100 >  5]
    #102 = [#100 >= 5]
    #103 = [#100 <  5]
    #104 = [#100 <= 5]
    #105 = [#100 =  5]
    #106 = [#100 <> 5]
    
    (subroutine call can be looped a number of times)
    (the L or Q word may be used to specify the count)
    (if neither L or Q is specified a count of 1 is used)
    (if the count is 0 the subroutine will not be called at all)
    
    M98 P1 L3  (example using L to specify the loop count)
    M98 P1 Q3  (example using Q to specify the loop count)
    
    M98 P1 L#100  (example using a variable loop count)
    
    M98 P1 L[5 > 4]  (example using a conditional as a loop count)
    M2
    
    O1
    #200 = [#200+1]
    M99
    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Jan 2015
    Posts
    7

    Re: KFlopWebNC pause problem and sub-programs in Kmotion

    Thanks Tom,

    I isolated the feed hold issue but unfortunately I haven't solved it yet. If I remove all of the axis index checks in the InitAxis function I am able to feed hold correctly. Unfortunately this means I'm unable to load the axis data from the interpreter datafile. Any ideas?

    I have done a sneaky work around and I am currently using c to read through a file and perform the calls to g-code files, thanks for the update though.

    Regards,
    Mike

  4. #4
    Join Date
    May 2013
    Posts
    16
    Hi Mike, hope you are able to see this. Do you remember what your sneaky C workaround was?


    Quote Originally Posted by MikeMz3 View Post
    Thanks Tom,

    I isolated the feed hold issue but unfortunately I haven't solved it yet. If I remove all of the axis index checks in the InitAxis function I am able to feed hold correctly. Unfortunately this means I'm unable to load the axis data from the interpreter datafile. Any ideas?

    I have done a sneaky work around and I am currently using c to read through a file and perform the calls to g-code files, thanks for the update though.

    Regards,
    Mike

Similar Threads

  1. Windows 7 install problem with KMotion
    By John Coloccia in forum Dynomotion/Kflop/Kanalog
    Replies: 8
    Last Post: 06-04-2014, 09:23 AM
  2. Problem Saving Programs to VF2
    By dingo0722 in forum Haas Mills
    Replies: 10
    Last Post: 12-28-2010, 07:52 PM
  3. Mazatrol M2 DNC connection problem, ISO programs
    By ddanutz1 in forum Mazak, Mitsubishi, Mazatrol
    Replies: 10
    Last Post: 08-09-2008, 11:38 AM
  4. Problem loading programs into DX32 control
    By D.Blair in forum Bridgeport / Hardinge Mills
    Replies: 1
    Last Post: 03-05-2008, 03:32 AM
  5. hardeware pause pause detected?????
    By Conquest1224 in forum Commercial CNC Wood Routers
    Replies: 1
    Last Post: 05-08-2007, 04:06 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
  •