Announcement

Collapse
No announcement yet.

Help explaining this code

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

  • Help explaining this code

    Hi Guys,

    I need help with the following code. Most specifically I need to know WHY Line # N09 in the first set behaves exactly as Line # N09 in the second set but both lines are different.

    I have intentionally separated the code so that when I run TRACE command, I can see what each line of code is doing. Obviously, there is no need to have lines N05 and N06 when one line, written like this N05 G00 G90 W42.68, will suffice.

    The bottom line is, I want the cutter to end up at a certain place and I want line N09 to cut a 30 deg cam and end up at the desired point. For certain, the cutter is ending up where I desire. So the question is, why is line N09 in the first set following the same path as line N09 in the second path?

    If you see stupid programming mistakes **but it doesn’t affect where the cutter is going** then please don’t discuss that at this time and stay On Topic as to why N09, in the first set, is taking the same path as N09 in the second set. I am certain there will be question and I am in the process of drawing illustration or producing actual images that may help explain (should it be absolutely necessary) what I am attempting to accomplish but it would be fruitless, at this time, to make a production of something that’s not currently germane to the apparent unaltered behavior of both N09s in each set. Hint: “Y” is missing in line N09 in the first set whereas “Y” is present in line N09 in the second set.

    N01 G00 G90 Z0.250
    N02 S3740 M03
    N03 G0 Y0.075
    N04 G0 X0.450
    N05 G00 G90 W12.68
    N06 G00 G90 W30.00
    N07 G01 G90 Z0.0F5
    N08 G01 G90 Z-0.160F5
    N09 G01 G90 X-0.200 W12.68F2
    N10 G0 Z0.250
    N11 G0 X0.0
    N12 G0 Y0.0
    N13 G0 W0.0
    N14 G0 Z0.0
    N15 M30


    N01 G00 G90 Z0.250
    N02 S3740 M03
    N03 G0 Y0.075
    N04 G0 X0.450
    N05 G00 G90 W12.68
    N06 G00 G90 W30.00
    N07 G01 G90 Z0.0F5
    N08 G01 G90 Z-0.160F5
    N09 G01 G90 X-0.200 Y0.075 W12.68F2
    N10 G0 Z0.250
    N11 G0 X0.0
    N12 G0 Y0.0
    N13 G0 W0.0
    N14 G0 Z0.0
    N15 M30

    Thanks,
    Harold
    For those having fought for it, Freedom has a flavor the protected will never know.
    Freedom is only one generation away from extinction.

  • #2
    It's taking the same path because the cutter is already at Y.075, so the Y.075 command in the second set of code in N09 won't result in any movement.

    The program is in G90 mode - absolute. So, Y.075 is one position and one position only. BTW, there is no reason to include a G90 in every line of code. It's turned on in N01 and will remain in effect until changed.
    George
    Traverse City, MI

    Comment


    • #3
      Originally posted by George Bulliss View Post
      It's taking the same path because the cutter is already at Y.075, so the Y.075 command in the second set of code in N09 won't result in any movement.

      The program is in G90 mode - absolute. So, Y.075 is one position and one position only. BTW, there is no reason to include a G90 in every line of code. It's turned on in N01 and will remain in effect until changed.
      Thank you so much George!!! Now I understand. That's exactly the info I needed. Now, if I change the value of Y to 0.85 or .095, then I would recognize a difference. The cutter would still travel in the X axis .200", as directed, but the cutter would be .085 or .095 further away from the part. Right?

      One last question, if G90 is not necessary, then in line N08 (and others), all I need to do is write it like this: N08 G01 Z-0.160F5 Is that correct?


      Thanks,
      Harold
      For those having fought for it, Freedom has a flavor the protected will never know.
      Freedom is only one generation away from extinction.

      Comment


      • #4
        Originally posted by hwingo View Post
        One last question, if G90 is not necessary, then in line N08 (and others), all I need to do is write it like this: N08 G01 Z-0.160F5 Is that correct?
        correct.
        Also, when you "turn on" your rapid G0, you do not need to keep activating it. Once you turn on something its on till its told different (for the most part).
        So once you turn G0 on, its active till another G-Movement (G1,2,3,71,70,76,80,81, etc.) is activated, vis-versa also, once G1 is active it stays active till something new come along. Hope that made sense.

        By the looks of it, was the code generated by a CAM system ?
        ~ What was once an Opinion, became a Fact, to be later proven Wrong ~
        http://site.thisisjusthowidoit.com
        https://www.youtube.com/user/thisisjusthowidoit

        Comment


        • #5
          Originally posted by hwingo View Post
          Now, if I change the value of Y to 0.85 or .095, then I would recognize a difference. The cutter would still travel in the X axis .200", as directed, but the cutter would be .085 or .095 further away from the part. Right?
          Changing the the Y in N09 from .075 to .095 would make the path different. The cutter would travel from Y.075 (where it was positioned in N03) to Y.095, a movement of .020. The cutter will end up .095 away from the Y0 reference with the change, .075 away from Y0 without the change.

          Regarding your question about the W axis, you are looking at things from a incremental perspective (G91), not the absolute (G90) that the program is in. Replacing the W12.68 and W30 moves with W42.68 gives an entirely different outcome. As it is written, the W moves to 12.68 from 0, then to 30 from 0, and then moves back to 12.68 from 0 while also moving in the x in line N09. Changing to W42.68 will move it to 42.68 from 0 and then back to 12.68 in N09.
          George
          Traverse City, MI

          Comment


          • #6
            Originally posted by iMisspell View Post
            By the looks of it, was the code generated by a CAM system ?
            No, I came up with the crazy code. I remembered CAM codes from previously generated codes and tried my best to make it do what I wanted using bits and pieces that I could remember.

            Yes, that which you said makes sense. Thanks for replying.

            Harold
            For those having fought for it, Freedom has a flavor the protected will never know.
            Freedom is only one generation away from extinction.

            Comment


            • #7
              Originally posted by George Bulliss View Post
              Changing the the Y in N09 from .075 to .095 would make the path different. The cutter would travel from Y.075 (where it was positioned in N03) to Y.095, a movement of .020. The cutter will end up .095 away from the Y0 reference with the change, .075 away from Y0 without the change.

              Regarding your question about the W axis, you are looking at things from a incremental perspective (G91), not the absolute (G90) that the program is in. Replacing the W12.68 and W30 moves with W42.68 gives an entirely different outcome. As it is written, the W moves to 12.68 from 0, then to 30 from 0, and then moves back to 12.68 from 0 while also moving in the x in line N09. Changing to W42.68 will move it to 42.68 from 0 and then back to 12.68 in N09.
              Thanks George. Just gave the program a go and it worked so I am pleased with the outcome.

              Thanks for helping out.

              Harold
              For those having fought for it, Freedom has a flavor the protected will never know.
              Freedom is only one generation away from extinction.

              Comment

              Working...
              X