Announcement

Collapse
No announcement yet.

De-bugging programs (CNC)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • De-bugging programs (CNC)

    I just finished a 3 hr stretch debugging and optimizing a simple program on my mill.

    I’ve tried using the features in software that allows visualization of the tool paths, and “feed and speed” calculations but can’t get myself to fully trust them until I see the tool in the material.

    And even them with my hand on the “Feed Rate Override” Sw. the whole time, slowly creeping it up to 100% and even 150% where I’m obviously too slow.



    As you can see I also end up deleting or modifing lines of code to avoid wastefull retraction moves. - not always as perfect as I would like to think I can calculate


  • #2
    Sounds like a normal approach...

    SOunds like the approach that most cnc programmers use when they first start out. And also when they convert a program to a new machine. Like anything else, when you get used to doing it you will be able to use all the shortcuts and get from program idea to finished part much quicker. Looks like good progress so far.

    Comment


    • #3
      When I first got involved in CNC programing we were taught straight G code and conversational for a Fanuc O-M control. In all honesty I prefered the straight G code over conversational for one simple reason. I was the back up to the guy that normally ran the CNC we had and when I had to run stuff he did in conversational I had a hell of a time doing any edits that were required because to code doesn't look any near the same. When I started doing CNC lathe work I made it a point to do all of my tool changes at the same x and y and do things in a clear logical order. One reason is lets say I had an insert on the finish tool chip and I had to change the insert out. I could home the machine, rotate the turret to the tool if I had to and then single step to the first tool change position. Jump ahead in the program to the finish tool and go from there. And we didn't have all of the fancy bells and whistles for setting tool size and such much less a post processor for washing CAD files through.
      Forty plus years and I still have ten toes, ten fingers and both eyes. I must be doing something right.

      Comment


      • #4
        Originally posted by Spin Doctor
        Jump ahead in the program to the finish tool and go from there. And we didn't have all of the fancy bells and whistles for setting tool size and such much less a post processor for washing CAD files through.
        I'm using fixture offsets in the CNC and not the program and that definitely poses a problem for me since it is the 1st line of code. Jump starting from a later point won’t pick up the offset.

        But as you say “Home the machine” or in my case run it to the “Fixture Offset” at the beginning of each logical step would fix that

        Nice!

        Comment


        • #5
          I don't like leaving feed override turned down, personally.

          Single block, FO % at either 0 or 100, with the control up on the "program check" screen, all finishing tools Z+.005 and R+.010. As the tool is coming to rest, I'm looking at where it wants to go next in the coordinates. If the move is sane, I let it run. There are some spots in programs where you will run into real big trouble if you have the feed turned down too far, so I let it run as programmed unless I have a specific reason to do otherwise. If the move is say, a rapid real close to the part or if I'm not sure about some aspect of it during the real move (is the part where I think it is, etc) I'll keep the feed and rapid down and watch the tool come in slow.

          Graphics are nice when you are writing the program to make sure you didn't add an extra zero in "X10.2" or tell the machine to go to "z-5," but they just tell you the machine isn't going to do something bizarre like mill the table.

          Also, you mentioned fixture offsets.

          Here's my "standard block" for anytime I call up a new tool. I do this each and every time a tool is called.

          Z1. M5 M8
          G91 G30 Z0 G90
          G53 X15. Y0. (Replace X15. with whatever coord puts the fixture right in front of you)
          M00 (I put option stops at the end of every toolpath and at every toolchange)
          N20 (Toolchange)
          T2 M6
          N21 (Tool #2, toolpath 1)
          G90 G54 G0 X0 Y0 S1500 M3 (Note the offset is set here, each and every tool)
          G43 H2 Z1.
          G0 Z.1 M8
          ... (Rest of toolpath)
          N22 (Tool #2, toolpath 2)

          ...And repeat for tool #3

          The G90 and G54 ensure, no matter where I stopped the program, that the machine will come back in a sane state. If somewhere in the program I'm using polar coordinates, changed the helix plane, or have an A/B axis, I will add the "desired state" for those parameters at this point as well, so it will look like:

          G0 A90 (A90 goes on a separate line to accommodate a clamped axis)
          G90 G55 G15 G17 G0 X0 Y0 S1500 M3

          The idea here is just go get enough information to the control to make sure when you're jumping around in a program that you have enough information at each toolchange to run from that point without having to call eight different lines spattered throughout the program.

          Comment


          • #6
            Originally posted by JoeFin
            I just finished a 3 hr stretch debugging and optimizing a simple program on my mill.

            I’ve tried using the features in software that allows visualization of the tool paths, and “feed and speed” calculations but can’t get myself to fully trust them until I see the tool in the material.

            .................................................
            Which part don't you trust? The graphic toolpath or the feed speed calculations.

            The graphics are generally right on, although they usually don't take into consideration a tool's radius. All the ones I've used, the tool is shown as a center point traversing.

            Feed/speed are tougher to get right. Too many variables, tool sharpness, tool length, depth of cut, deflection all enter in. Those you just have to try and see what happens, near impossible to get everything optimized the first try..

            Comment

            Working...
            X