Strange KmotionCNC behavior - Page 2


Page 2 of 2 FirstFirst 12
Results 13 to 23 of 23

Thread: Strange KmotionCNC behavior

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

    Default Re: Strange KmotionCNC behavior

    mmurray70,

    Let me explain what happened since I might have rushed this at the beginning of the post. I had two different programs, which are very simple. The first program would go down a drill 18 holes and it used peck drilling cycle. That program also exhibited the same issues so the Tool Length offset issues does appear to be the common issue. Now back to what happened. When loaded the material to the table and secured it, then I jogged the spindle with a sharp bit over to find the relative X,Y of the job and then zero'd the DROs for X and Y. Now I have the G54 location for X and Y. Next I lowered the Z axis down to the top of the material and then zero'd the Z axis DRO. Now G54 is full established, I have X,Y, and Z defined for G54.

    Now I jog the Z axis up to maybe three inches above the material and press cycle start. The spindle starts and moves to the G54 XY position and then indexes over to the first hole all of that works perfect. Then Z starts coming down but I failed to reduce the feedrate so it plows right though a 1" thick piece of MDF before I could hit the estop.

    Now I have been running the CNC machines for over 15 years so I am by no means a newbee. The first though was damn you dumb ass you forgot to zero the Z axis before you started. Wrong.

    Next I load a new piece of material on the machine and re-establish the G54 location exactly as before. Then I jog Z axis up three inches above the material but this time I set the feedrate to a very slow speed. Then I press cycle start and have my finger on the feedhold button. The machine again moves to the correct G54 XY position and then indexes to the first hole so everything looks perfect. Then Z starts coming down and I notice the Z axis DRO has a reading like 3.25" and the bit is only 1/2" above the table. I realize this will crash right into the table again if I proceed. I press the halt button, rewind the gcode, then reset the Z axis to the top of the material, zero the Z axis DRO again, then job up a couple inches and press cycle start again. This time it start coming down slowly and I watch the DRO which looks correct, so it comes down and starts the drill cycle with the V carving bit which just creates the same profile as the top of a screw so it will be flush when the screw is inserted in the hole during assembly. The entire program runs all the way through and works correctly.

    Now the question is how come I had to zero the Z DRO repeatedly to get this to work correctly. I am certain you are correct that the tool offset that the CAM added must have pulled a number from somewhere to add to the Z axis DRO. I look at the tool table and the only offsets I can see in the tool table for KmotionCNC seem to be for X and Y, nothing for tool length that I could find. But I am sure if I kill that line as you suggested this will work perfect without any issues.

    Russ



    Tool Length Offsets
    Tool length offsets are given as positive numbers in the tool table. A tool length offset is programmed using G43 Hn, where n is the desired table index. It is expected that all entries in the tool table will be positive. The H number is checked for being a non-negative integer when it is read. The interpreter behaves as follows.
    1. If G43 Hn is programmed, A USE_TOOL_LENGTH_OFFSET(length) function call is made (where length is the value of the tool length offset entry in the tool table whose index is n), tool_length_offset is reset in the machine settings model, and the value of current_z in the model is adjusted. Note that n does not have to be the same as the slot number of the tool currently in the spindle.



  2. #14
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1040
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Mmurray70,

    Not sure how I overlooked this unless my J version did not have tool length. This video shows I guy putting in tool length offsets automatically in Kmotioncnc. I will need to double check mine, but my guess is since mine was not populated that kmotioncnc used some unknown value for the offset, that seems to be the most logical issue.



    Russ



  3. #15
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Im betting that you didnt select tool 2 in kmotioncnc prior to your setup. You ran the program, it switched tools in the program and was then off. You halted, tool 2 is now still selected from running the program, you rezero, this time with the right tool and you re run it and its fine. Is this possible?



  4. #16
    Registered
    Join Date
    May 2012
    Location
    canada
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    Quote Originally Posted by CNCMAN172 View Post
    Mmurray70,

    Not sure how I overlooked this unless my J version did not have tool length. This video shows I guy putting in tool length offsets automatically in Kmotioncnc. I will need to double check mine, but my guess is since mine was not populated that kmotioncnc used some unknown value for the offset, that seems to be the most logical issue.



    Russ
    The tool length offset is the third column in the table in the video. Try adding a tiny number and see if it helps, cant hurt. If you want to start using offsets properly i attached the modified, simpler tooltableset program i use. You need to rename to .c instead of txt and configure as a user button. I added a shortcut key to mine and use the "insert" button on the keyboard.

    To use this program simply load tool, move to some common height point that you will touch all tools. This could be top of machine table, top of a gage or 123 block, top of a dial height setter (this is what i use, see pic for my homemade one) or anything really, As long as all tools are touched off the same thing. Then just run this c program and it will store length. Then as long as a tool is measured you can use it to set zeros the same as your normally would. You can reset your G54 with a single tool and all other tools move with it.

    You need to be extra careful with manual toolchanges that the toolnumber in kmotioncnc matches the actual tool.

    Attached Thumbnails Attached Thumbnails Strange KmotionCNC behavior-20170207_122442-jpg  
    Attached Files Attached Files


  5. #17
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1040
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    mmurray70,

    To be honest, I normally do not use the tool table. I run Mach3, Mach4, and KmotionCNC. This is probably a poor habit on my part, since I did not populate the tool table before I ran these jobs. I looked in the tool table and found no length or xy offsets populated. I had a 1/8" EM populated in T1 and a 1/4" EM populated in T2, nothing else. In these two programs I ran a drill bit and then a vcarving bit.

    When I first started the machine I ran the drilling program and saw this same behavior but caught it before any damaged occurred and resolved it the same way by setting the Z dro repeatedly to the top of the material. My guess is kmotioncnc is adding something to tool length offset if nothing is populated in the tool table, but that is just a guess, this could be a bug. I would think if no length value is in the table it would assume zero. TK might have a comment.

    Russ



    %
    O0000(CNC-SUPPORT-COLUMN-3)
    ( T2 | 1/4 INCH ENGRAVING TOOL 90 DEGREE X .001 TIP LONG | H2 )
    N100 G20 ( inch system )
    N102 G0 G17 G40 G49 G80 G90 ( Rapid positioning ON, XY Plane Selection, Cancel cutter diameter compensation, Cancel Tool length offset, cancel motion mode, Absolute)
    N104 T2 M6 ( Tool#2, tool change)
    N106 G0 G90 G54 X.5 Y1. S6000 M3 ( Rapid, Absolute distance, Work Present 1, XY position (.5,1), Spindle 6000, Spindle CW)
    N108 G43 H2 Z.1 ( tool length offset, H2 is not populated in tool table)
    N110 G99 G81 Z-.215 R.1 F5. ( R value return canned cycles, drilling canned cycle, Z depth = -.215", return to .1", Feedrate 5 )
    N112 Y6.2813



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

    Default Re: Strange KmotionCNC behavior

    Thank you for the tooltableset file, I have a similar tool length gauge I got about a month ago but have not even used it yet. I will run some experiments, I think you might be correct, adding a tiny value in the tool length might fix the issue, not sure.

    Russ



  7. #19
    Registered
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1040
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    mmurray70,

    Well I am feeling pretty stupid at this point. I went out to the check the version of Kmotion I was running which is older version 4.33C, and looked at the tool table again. Lo and behold when I populated it for a job long ago, I put the tool numbers in the wrong column. I had a tool length of 3 in the second tool position, which totally explains what happened. I need to get a new computer so I can run windows7 and the newer version of kmotioncnc with the screen editor and get current again. Thanks for the help.

    Russ



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

    Default Re: Strange KmotionCNC behavior

    Thats great, at least you found the problem. I had a feeling it was something minor and you would eventually find it. No need to feel stupid, we have all been there with a simple thing like that you just cant seem to figure out. At least you learned a little about offsets in the process

    This confirms what i said in post 15, you setup the job with tool1 probably, ran it and when the controller switched to tool 2 the height changed, then you retouched, this time with the proper tool offset loaded (since the program changed it for you when you ran it) and everything was fine.



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

    Default Re: Strange KmotionCNC behavior

    mmurray70,

    As i pondered this issue I am really wondering, why would the CAM use the G43 tool offset? Further I guess I really don't understand this clearly. The offset was 3", meaning the tool was three inches long, longer than the vcarve bit in he collect but you would think the only reason it would need to know the length would be to ensure the tool was high enough not to crash into the material before drilling started. That would seem to indicate it should have been drilling in air well above the table. I know the offset is the issue, but I guess I don't really understand the reason for using a tool offset in a drilling cycle.

    Russ




    ( T2 | 1/4 INCH ENGRAVING TOOL 90 DEGREE X .001 TIP LONG | H2 )
    N100 G20 ( inch system )
    N102 G0 G17 G40 G49 G80 G90 ( Rapid positioning ON, XY Plane Selection, Cancel cutter diameter compensation, Cancel Tool length offset, cancel motion mode, Absolute)
    N104 T2 M6 ( Tool#2, tool change)
    N106 G0 G90 G54 X.5 Y1. S6000 M3 ( Rapid, Absolute distance, Work Present 1, XY position (.5,1), Spindle 6000, Spindle CW)
    N108 G43 H2 Z.1 ( tool length offset, H2 is not populated in tool table)
    N110 G99 G81 Z-.215 R.1 F5. ( R value return canned cycles, drilling canned cycle, Z depth = -.215", return to .1", Feedrate 5 )
    N112 Y6.2813



  10. #22
    Registered
    Join Date
    Jun 2013
    Location
    USA
    Posts
    919
    Downloads
    0
    Uploads
    0

    Default Re: Strange KmotionCNC behavior

    The three inches has nothing to do with the tool length. It is the distance from z zero (home) to the top of the part. You are thinking of g43 all wrong. What you have been doing for years is fine but your case is not typical so cam programs are doing things you are not. This is the easiest way to look at it.

    Pretend there is no z zero button for any of the fixture offsets. You can only set x and y. You still need to set a z zero but instead of using the z zero button you set the tool offset for the tool you are using. This effectively does the same thing as setting the z fixture offsets so it has to remain zero. When you touched off at the top of your part you had yet to run the g-code. You set your z fixture offset by bringing the tool down to the top of your part and zeroing. When you ran the codes T1 and then later G43 H1 you called the tool height H1 for tool 1 T1 and put it into effect G43. That combined with the z fixture zero you already set caused the crash. Your machine thought it needed to go 3 inches lower to get to your part. After you crashed the g-code interpreter had been set for T1 H1 and unless you cancelled those offsets they would stay persistent. So now you bring your new tool down to the part and zero z fixture offset again. When you run the code again no crash because setting the z again after the tool offsets had been read effectively cancelled them.

    Two fixes either stop using your z fixture offset and set your tool offset instead or erase the codes T1 M6 and G43 H1 from your code before running it.

    Ben

    Sent from my HTC6525LVW using Tapatalk



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

    Default Re: Strange KmotionCNC behavior

    Ben,

    Thank you, I understand now. This is setup like the Fadal we had at work that had the tool table with all the lengths stored in the control memory. We use to set material height and that is all. Now I understand should have learned this long ago on my home machine. No tool changer so I ignored this stufff.

    Russ



Page 2 of 2 FirstFirst 12

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