586,108 active members*
3,293 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2007
    Posts
    781

    Some strange stuff with local vars.

    Plotting this program it seems to think variable #32 is always zero.
    If I replace the three uses of #32 with #27, thru #31 it works the same way.
    But if I replace them with #26 or #25 it works as expected.
    I did not check all the numbers less then #27 but I expect they would also work.
    Variable #99 does not work but #100 does so I expect any global would work but only locals less then #27 would work.


    I have not tried running on a actual machine yet either.


    Code:
    O9110
    #6=0.125(INSIDE CORNER RADIUS)
    #7=1.100(SMALL ROUGH OD)
    #8=1.000(SMALL FINISHED OD)
    #9=0.062(CHAMFER SIZE)
    #10=0.006(END FACE MATERIAL)
    #11=0.888(LENGTH OF SHOULDER)
    #12=0.520(ID FOR FACE CUT)
    #13=0.0156(TOOL NOSE RADIUS)
    #14=0.0000(TAPER COMP)
    #15=0.0010(SECOND FINISH PASS)
    ()
    #33=FUP[[#7-#8]/0.020](TEMP,NUMBER,OF,PASSES)
    (****)
    #32=0.010
    (****)
    G0Z[#10+0.100]
    G0X[#7+2*[#6]+0.200]
    G73U[#7-#8]W[#33*0.0001]R#33(MATERIAL,AND,PASSES)
    G73P31Q32U0.0010W0.0000S350F0.0030
    N31G0X[#8+#15]Z[#10+0.010]S450F0.0010
    G1X[#8+#14+#15]Z[-#11+#6-#13]
    G2X[#8+#14+#15+2*[#6-#13]]Z[-#11]R[#6-#13]
    N32G1X[#32+#8+#14+#15+2*[#6-#13]]
    G70P31Q32(FINISH,PASS)
    #15=0.0
    #32=2.000-[#8+[2*#6]](CLEANUP,FULL,FACE)
    G70P31Q32(FINISH,PASS)
    G0Z0.200

  2. #2
    Join Date
    Mar 2003
    Posts
    765
    Andre',

    I tried your program, but I am not seeing what you describe. Do you get the same results when you plot it from the variable display window?

    Scott

  3. #3
    Join Date
    May 2007
    Posts
    781
    Yep get the same results.

    Here are some screen shots of using variable #32, the rough and both finish passes stop at the end of the 0.25 radius.

    And the second that works the way I think it should when using #26, the rough and first finish pass stop 0.010 out from the end of the 0.25 radius and the second finish pass goes out 2.000 from the end of the radius.

    Upload is not working, will try later.

  4. #4
    Join Date
    Mar 2003
    Posts
    765
    Andre',

    After looking at this some more, I've managed to find the problem. NCPlot handles the G70 cycle as a subprogram and must pass the local variables to it. However, only the first 26 variables are being passed.

    Thanks,
    Scott

Similar Threads

  1. Mach3 tuning (cuts small stuff fine, but is off on big stuff)
    By jdbaker in forum Mach Software (ArtSoft software)
    Replies: 4
    Last Post: 03-15-2007, 05:30 PM
  2. Local variables
    By jorgehrr in forum G-Code Programing
    Replies: 4
    Last Post: 02-19-2007, 10:03 PM
  3. G65 local variables help
    By FanukRC in forum G-Code Programing
    Replies: 7
    Last Post: 07-26-2006, 12:00 AM
  4. welding thick stuff to thin stuff - need advice
    By cross6 in forum Welding Brazing Soldering Sealing
    Replies: 5
    Last Post: 01-13-2005, 08:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •