585,712 active members*
4,205 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1

    Post Loop Fanuc Oi

    Hi

    I'm new to the subject, and would like to create a one-repeat loop for a program like this, using IF, WHILE, GOTO.
    I'm work with a mazak VCP 400S.

    G17 G21 G40 G80 G94 G98
    G91 G28 Z0
    G57 G90
    M72
    M116
    G52 X-39.9 Y86.381 Z10
    T1 M6 (DRILL 1.30MM)
    S4900 M3
    G43 H1 Z100
    G0 X0 Y0
    G0 Z-28
    G83 X-8.5 Y-6.2 Z-53 R-45 Q30.0 F300 M8
    x-24.5
    x-41.5
    x-57.5
    x-74.5
    x-90.5
    x-107.5
    x-123.5
    x-140.5
    x-156.5
    x-173.5
    x-189.5
    x-206.5
    x-222.5
    x-239.5
    x-255.5
    x-272.5
    x-288.5
    x-305.5
    x-321.5
    M9
    G52 X0 Y0 Z0
    G80
    G91 G28 Z0
    G56 G90
    G52 X-39.9 Y86.381 Z10
    T2 M6( screw thread 1.40MM)
    G43 H2 Z100
    G0 X0 Y0
    G0 Z-28
    G98 M29 S682
    G95 G84 X-8.5 Y-6.2 Z-4 3R-49 F0.3 M8
    x-24.5
    x-41.5
    x-57.5
    x-74.5
    x-90.5
    x-107.5
    x-123.5
    x-140.5
    x-156.5
    x-173.5
    x-189.5
    x-206.5
    x-222.5
    x-239.5
    x-255.5
    x-272.5
    x-288.5
    x-305.5
    x-321.5
    M9
    M117
    G52 X0 Y0 Z0
    G80
    G91 G28 Z0
    M30

    I want to use the coordinates used in the drilling to make a thread without having to repeat each one using IF or WHILE.
    I can use GOTO to return to block x-24.5 but I don't know how to tell it not to repeat again when it encounters GOTO again.

  2. #2
    Join Date
    Aug 2007
    Posts
    413

    Re: Loop Fanuc Oi

    Punktfolge auf einer Geraden / line at angle

    G81 Z-5. R1. F100 L0
    G65 P4705 {X Y} I J A
    {G65 P4705 X Y I J A}
    G80

    G65
    P Unterprogrammnummer / cycle
    X X-Position des 1. Punktes (abs.) / X-position first point (abs.)
    Y Y-Position des 1. Punktes (abs.) / Y-position first point (abs.)
    I Abstand zw. den Punkten / distance between points
    J Winkel der Geraden / angle of the line
    A Anzahl der Punkt / number of holes

    %
    O4705 (Pos Linie)
    IF [#24 EQ #0] THEN #24=#5001
    IF [#25 EQ #0] THEN #25=#5002
    IF [#4 EQ #0] THEN #3000=1 (kein Abstand definiert/no distance)
    IF [#5 EQ #0] THEN #3000=1 (kein Winkel definiert/no angle)
    IF [#1 EQ #0] THEN #3000=1 (keine Anzahl in X definiert/no number of holes)
    #10=0
    N1
    X[#24+COS[#5]*[#10*#4]] Y[#25+SIN[#5]*[#10*#4]]
    #10=#10+1
    IF [#10 LT #1] GOTO 1
    N99
    M99
    %

Similar Threads

  1. Fanuc 180i Loop Counte
    By Boss001 in forum Parametric Programing
    Replies: 4
    Last Post: 02-23-2019, 04:33 PM
  2. Closed loop servo vs real close loop in motion controller
    By ciufuliciboy in forum Servo Motors / Drives
    Replies: 25
    Last Post: 04-21-2018, 04:36 AM
  3. Replies: 1
    Last Post: 01-05-2018, 05:19 AM
  4. Closing the loop with Path Pilot. Possibly dual (global) closed loop?
    By SwampDonkey in forum Tormach Personal CNC Mill
    Replies: 29
    Last Post: 05-04-2016, 09:39 PM
  5. question on closed loop vs open loop (servo systems)
    By boonie in forum Servo Motors / Drives
    Replies: 20
    Last Post: 11-09-2007, 07:30 PM

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
  •