585,974 active members*
4,219 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > problem with macro programming Fanuc 10M
Results 1 to 3 of 3
  1. #1
    Help...I have the following problem... In a square pocket cycle, the cycle keeps repeating itself but without a Z infeed. However I only want to run it once.
    What do I have to change in the macro program so that the cycle only runs once?
    Parts of the cycle:


    IF[#4010EQ99]GOTO5
    #19=#5003
    GOTO10
    N5#19=#18
    N10#29=2000+#7
    #29=#[#29]
    #6=#6+0
    IF[#6NE0]GOTO11
    #6=#29*1
    N11#6=ABS[#6]
    (FIN.-N15)
    #1=#1+0
    #2=#2+0
    N13#28=#4
    IF[#1EQ0]GOTO14
    #4=#4-#1
    #5=#5-#1
    N14#27=#26
    IF[#2EQ0]GOTO15
    #26=#26+#2
    N15#20=#4-#29
    #21=#24+#20
    #20=#24-#20
    #22=#5-#29
    #23=#25+#22
    #22=#25-#22
    N20G17G90G00X#24Y#25
    Z#18
    #13=1
    #14=9999.
    WHILE[#14GT#26]DO1
    #14=#18-#17*#13
    IF[#14GT#26]GOTO25
    #14=#26
    (BOTTOM.FIN.-N25)
    #26=#27
    N25G01Z#14F[#9*0.6]
    N30#11=[#21-#20]/#6/2
    #12=[#23-#22]/#6/2
    IF[#11LT#12]GOTO31
    #10=FIX[#12]
    GOTO32
    N31#10=FIX[#11]
    N32(TOTAL)#20=#24-#6*#11
    #11=#11-#10
    #12=#12-#10
    #30=9999.
    WHILE[#30GT#20]DO02
    M01
    #30=#24-#6*#11
    #31=#24+#6*#11
    #32=#25-#6*#12
    #33=#25+#6*#12
    IF[#30GT#20]GOTO35
    #30=#20
    #31=#21
    #32=#22
    #33=#23
    (NOT.EVERY.FIN.-N40)
    IF[#14NE#27]GOTO35
    (FIN.-35)
    #20=#28-#29
    #21=#24+#20
    #20=#24-#20
    #22=#5+#1-#29
    #23=#25+#22
    #22=#25-#22
    N35G01F#9
    Y#32
    X#31
    Y#33
    X#30
    Y#32
    X#24
    #11=#11+1
    #12=#12+1
    END2
    G01X#31
    X#24Y#25F[#9*8]
    #13=#13+1
    END1
    G00Z#19
    M99
    %

  2. #2
    So another information... I have G65P1234X..Y..I..J..K..D..Z..R.. written in the main program and I found out that everything is goes by I, J and K and that it’s all is written in Variable 1 and Variable2.

  3. #3
    Hello
    1. WHAT have you written there?
    Can you separate you program a bit more so we can see what parts are used for what.
    Add commends and stuff.
    2. First try to start with a HP before you finally call it as a macro.
    That way you can avoid errors with the ABC variables.
    3. I find it too unclear to find errors in that macro. Particularly because a real time diagnosis would could help you out.
    (run it sentence by sentence and watch out for the variables at the same time. The G65 might cause problems- depending on the parameter setting.)

    Regards

Posting Permissions

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