Strange KmotionCNC behavior


Page 1 of 2 12 LastLast
Results 1 to 12 of 23

Thread: Strange KmotionCNC behavior

  1. #1
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1125
    Downloads
    0
    Uploads
    0

    Cool Strange KmotionCNC behavior

    TK,

    I had a simple job was was to use a 90 degree vcarve bit to taper the top of some drill holes so taper screws would sit flush. It took only a few minutes to draw up the drawing and the g-code created was very short since it used canned cycles.

    I first positioned the MDF to cut and set my G54 location for X,Y at the corner of the material. Then I set the Z to the top of the material and normally that would be all I need to do except raise the Z up and press cycle start.

    Well I was so confident this would run perfect that I did not have my handle next to the estop button. Big mistake. The big plowed right through 1" MDF ruining the pieces. Ugh.

    I got another piece of material and just assumed I forgot to zero the Z on the top of the material. Well I did it again and zero'd it on the top of the material moved it up but this time set the feedrate to very slow. When I pressed cycle start I noticed the Z dro have something like 3.25 and it was only .5" above the material. I pressed halt then pressed rewind, then zero'd the Z axis again on top of the material and moved it up an inch and told it to run. This time it worked correctly and only went down -.215". I have studied this code and for the life of my can not figure out what I did wrong. The code is listed below and came right out of CAM program at work. I had it output generic FANUC three axis code since that has worked in the past for my simple three axis machine with the Kflop. Any idea of what caused this issue? I had a friend of mine who has a larger machine with a KFLOP test the same code and it did the same thing on his machine.

    Thanks for taking a quick look.



    %
    O0000(CNC-SUPPORT-COLUMN-3)
    ( T2 | 1/4 INCH ENGRAVING TOOL 90 DEGREE X .001 TIP LONG | H2 )
    N100 G20
    N102 G0 G17 G40 G49 G80 G90
    N104 T2 M6
    N106 G0 G90 G54 X.5 Y1. S6000 M3
    N108 G43 H2 Z.1
    N110 G99 G81 Z-.215 R.1 F5.
    N112 Y6.2813
    N114 Y11.5625
    N116 Y16.8438
    N118 Y22.125
    N120 Y27.4063
    N122 Y32.6875
    N124 Y37.9688
    N126 Y43.25
    N128 X3.825
    N130 Y37.9688
    N132 Y32.6875
    N134 Y27.4063
    N136 Y22.125
    N138 Y16.8438
    N140 Y11.5625
    N142 Y6.2813
    N144 Y1.
    N146 G80
    N148 M5
    N150 G91 G28 Z0.
    N152 G28 X0. Y0.
    N154 M30
    %

    Similar Threads:


  2. #2
    Registered Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    795
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Just a guess is line N108. You could have a tool height offset in there for H2. It would add that offset to the zero height.



  3. #3
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1125
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Jim
    You might be right I forgot to look at the tool table. Thanks for the idea, will let you know what I find



  4. #4
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1125
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Jim,

    The issue has nothing to do with offsets in the tool table, I check there are no offsets on T1 to T4 the only thing populated is the tool size like 1/4" endmill, etc.

    He is used with the G43 tool offset command. Right before it gets into the canned drilling cycle.

    Russ



  5. #5
    Registered Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    795
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    G43 is tool height offset, is it possible that something is ''stuck'' in the program/controller somewhere?



  6. #6
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1125
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    My understanding this is used with drill cycles to take into the shape of a drill being pointed so it must go a little deeper to get to the drill diameter.

    Since this does the same thing on two machines so unlikely it is something stuck.

    Russ



  7. #7
    Registered Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    795
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    In that case, I have no idea. The code looks fine.



  8. #8
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    55
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Are you sure you were using G54 when you set the height? Could you have been using another offset in a previous program? I agree its most likely line 106 or 108 when the offsets are applied.

    One issue i see with your program is at the end when it switches to G91 to home, its a good idea to switch back to G90 for safety sake otherwise the machine is left in incremental mode after running a program. Im not sure if setting up a job in incremental mode could cause some kinda strange problem, unlikely but could be possible.

    Never start a program with the tool close to the work. Always start from above and hit feedhold when tool gets close to work, estimate gap between tool and work and verify this with the Z position in KmotionCNC. To be safe you really need to do this at the start of every tool in a new program or new setup. Also it would be nice to check distance to go but this feature seems to be missing. Keep that one in mind for the future Tom, Thanks.



  9. #9
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1125
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    mmurray70,

    I only ran two programs, the first program used drill cycles with peck drilling to drill the holes. I kept that in a separate file since my machine does not have a tool changer. That program also did something strange like this as well. When I positioned the material in the machine and press zero for X,Y and then moved the spindle down to touch the top of the material and zero the DRO. At that point G54 is established in X,Y, and Z. I noticed that when the program told the machine to go the the first hole in this program it uses a G54 command to get there and that works perfect.

    N106 G0 G90 G54 X.5 Y1. S6000 M3

    The next two lines seem to be the issue at hand.

    N108 G43 H2 Z.1
    N110 G99 G81 Z-.215 R.1 F5.

    G43 Hn (Tool #n length comp On) reading on the internet this code is often used with drill cycles to compensate for the shape of a drill. The are sharp and pointy and you need to go deeper to get the hole to diameter.

    G99 is R Point returned used in drilling cycles to let it know how high to come up in a drilling cycle. The Dynomotion sites does not list this for KmotionCNC, maybe that is the issue?

    G81 is the canned drilling cycle, again KmotionCNC does not list this gcode on their website, but it does work once get set Z three times, so not sure if the website is just out of date.

    G81 X_ Y_ Z_ R_ L_ F_
    X,Y position of hole in XY plane
    Z end point of hole
    R retract plane
    L number of repetitions
    F feedrate

    Not sure if this is a KmotionCNC bug the code runs correctly in Mach4.



  10. #10
    Registered
    Join Date
    Aug 2005
    Location
    United States
    Posts
    152
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Quote Originally Posted by CNCMAN172 View Post
    G81 is the canned drilling cycle, again KmotionCNC does not list this gcode on their website, but it does work once get set Z three times, so not sure if the website is just out of date.
    Not sure if this helps or not ... 11.2 G81 Cycle ... but at least it is on the Dynomotion web site.



  11. #11
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1125
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    arvidj,
    Thanks for that link, seems like they have a link to the EMC website that details gcode. The page on Dynomotion website where I was looking is listed below.

    G Code Screen

    I found the link you provided they do explain their code is based on the open source EMC gcode interpreter like most companies so that makes sense. Thanks


    KMotion's G Code interpreter was derived from the Open Source EMC G Code Interpreter. Click here for the EMC User Manual (Only the G Code portions of the manual, Chapters 10-14 pertain to KMotion G Code)

    Russ



  12. #12
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    55
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Quote Originally Posted by CNCMAN172 View Post
    mmurray70,

    I only ran two programs, the first program used drill cycles with peck drilling to drill the holes. I kept that in a separate file since my machine does not have a tool changer. That program also did something strange like this as well. When I positioned the material in the machine and press zero for X,Y and then moved the spindle down to touch the top of the material and zero the DRO. At that point G54 is established in X,Y, and Z. I noticed that when the program told the machine to go the the first hole in this program it uses a G54 command to get there and that works perfect.

    So what exactly was the problem? You mention it doing something strange and then towards the end of you post you say it works perfect?


    N106 G0 G90 G54 X.5 Y1. S6000 M3

    The next two lines seem to be the issue at hand.

    N108 G43 H2 Z.1
    N110 G99 G81 Z-.215 R.1 F5.

    G43 Hn (Tool #n length comp On) reading on the internet this code is often used with drill cycles to compensate for the shape of a drill. The are sharp and pointy and you need to go deeper to get the hole to diameter.
    G43 is used to compensate for different length tools used in the same program. Not to be confused with drill tip compensation as you mentioned above, that is commonly found in CAM software. Various tool lengths are stored in the tool table (There is a C program that you can setup as a user button to set these values) and at the start of a program or after a toolchange the proper offset is applied in the controller so it cuts at the right depth for that tool.

    For what you are doing right now, with no toolchanger, and not even manual toolchanges, you could try just deleting this line as you dont need really need it. It would be useful in the future if you start doing manual toolchanges.

    You mentioned there are no tool lengths populated in the tool table, im not sure if that could cause an issue maybe? Your trying to apply an offset in g code that isnt even there. Maybe try a very small value like 0.0001 for length in your tool table.

    Also one more thing comes to mind, make sure you have the right tool selected when you setup your job. For example if tool1 is selected in kmotioncnc on startup, and you zero out z and run the program which calls tool2 its going to be different. Maybe not actually in your case since your not using different tool offsets, but this is still a good practice.

    G99 is R Point returned used in drilling cycles to let it know how high to come up in a drilling cycle. The Dynomotion sites does not list this for KmotionCNC, maybe that is the issue?

    G81 is the canned drilling cycle, again KmotionCNC does not list this gcode on their website, but it does work once get set Z three times, so not sure if the website is just out of date.

    G81 X_ Y_ Z_ R_ L_ F_
    X,Y position of hole in XY plane
    Z end point of hole
    R retract plane
    L number of repetitions
    F feedrate

    Not sure if this is a KmotionCNC bug the code runs correctly in Mach4.
    G99 or G98 are used to specify what Z height the machine moves to when moving between holes in a canned cycle. G99 will move to the R plane between holes and G98 will move to the "initial" plane. For example with the following code:

    N090 G0 X0. Y0.
    N100 Z2.
    N110 G99 G81 Z-.215 R.1 F5.
    N120 X2.0
    N130 X4.0
    N140 G80

    With G99 the tool would move to a height of 0.1 between holes, with G98 instead of G99 the tool would move to the initial plane (current position when canned cycle is called) which is 2.0 in this case and move between holes then rapid to 0.1 and then drill hole and repeat. G98 will be safer around clamps if you set it up properly.

    There were some changes in the way G99 and G98 and G83 peck drill cycles are handled in the most recent version of kmotion. It works now the way a standard fanuc style controller would. But I dont think there are any changes that could explain your crash. G81 also works fine with kmotion, theres no reason to go back to mach 4. Theres some minor thing you are missing and when you figure it out you will be much happier overall with kmotioncnc.



Page 1 of 2 12 LastLast

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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Strange KmotionCNC behavior
Strange KmotionCNC behavior