Offset positions - Need help

  • Hi,
    I use a FANUC M710i with RJ-2 controller –a pretty old robot- in a working cell to grind different kinds of pieces. The automation also consists of a barrel magazine that the pieces are stored and a Cartesian manipulator that picks the piece returns to a referenced position where the robot places the finished workpiece and takes the next one. Manipulator then stores the finished workpiece takes the next one etc etc etc.
    There is a MAIN_PRG which handles the connection between the robot and the automation that is, the points where the robot picks and places the part, a counter that stores the pieces done so far with an if branch, a call statement that calls the grind process routine depending the workpiece, and several DOs and DIs to handle the automation. The MAIN_PRG is always the same no matter the workpiece.
    So my question is this:
    What is the most efficient way, inside the routine to use offset positions for a given set of points? I have wheels that “drop” really fast so I need for a set of points lets say 6, every 15 pieces done to “increment” lets say the X axis 1mm forward to compensate for the wheel getting smaller. Could I use the counter from the MAIN_PRG inside the routine ?

  • Place your Ad here!
  • Sure, I would increment the counter right before the call. Then you can multiple the counter by an incremental amount and store it into a Position register element to use for your offset. Then apply that offset to the grinding positions.


    I would set a maximum limit in your program, in case they forget to reset the counter. Then have a written procedure for the operator to reset the counter back to 0 any time they change the wheel.


    An even better way would be to have a sensor detect the diameter of the wheel and change the offset automatically in the program. Then you remove the possibility of human error.


  • I would set a maximum limit in your program, in case they forget to reset the counter. Then have a written procedure for the operator to reset the counter back to 0 any time they change the wheel.


    An even better way would be to have a sensor detect the diameter of the wheel and change the offset automatically in the program. Then you remove the possibility of human error.


    There is no need for a manual reset. All the counters are basically Registers inside the main program. The program is like This:


    mpla mpla mpla
    call TCP
    call robot_home
    DO[] = on/off (misc Digital inputs outputs that control manipulator etc)
    R[51]= 0
    R[52]= 0
    LBL[1]
    DO[1] = ON
    J 100% to_manipulator_to_get_piece
    DO[3] = OFF
    L 50mm get_piece_out_of_manipulator
    Call Robot_Home
    Call Grind_program
    Call robot-Home
    J 100 return_workpiece_to_manipulator
    DO[whatever] = ON/OFF
    R[51] = R[51] +1
    IF R[51] < 720 JMP LBL[1] (720 is the magazine capacity - its line takes 12 pieces and barrel turns automatically by the PLC - manipulator has 12 spots)
    Call Robot_home
    END


    My only problem though is this:
    Apparently I can use R[52] inside grind_program to make a logical condition but:
    lets say I have 3 points
    L P[1] 100mm CNT100 -P1 x:10mm y:10mm z:100mm w,p,r irrelevant-
    L P[2] 100mm CNT100 -P2 x:10mm y:10mm z:60mm w,p,r irrelevant-
    L P[3] 100mm CNT100 -P3 x:10mm y:10mm z:10mm w,p,r irrelevant-


    what is the best way to program the robot that IF R52 = 15, P[1] x = P[1]x + 2mm P[2] x = P[2]x + 2mm etc? Keep in mind that I dont only need to increment but also STORE the new x position and then increment another 2 mm after 15 pieces to the new position.

  • You need to use an offset.


    : PR[10,1]=R[52]*0.133;
    : Offset Condition PR[10];
    :;
    :L P[1] 100mm/s CNT100 Offset;
    :L P[2] 100mm/s CNT100 Offset;
    :L P[3] 100mm/s CNT100 Offset;



    The .133 is just your 2mm/15 pieces. This way it will offset slightly after every cycle. If instead you want to offset only after 15 pieces, you can use:


    : R[10] = R[52] div 15;
    : PR[10,1] = R[10]*2;


  • Thank you HawkME. Everything is pretty much clear now. One other way I came up with was to make a USER FRAME at the center-of-contact of the wheel and Offset the USER frame every 15 pieces. This way it will shift All the points taught on that wheel by the amount specified in the offset. Is that correct ?

  • That can work, but I would advise against it. When you modify the user frame itself, you would be moving it in world coordinates, not user coordinates. All user frames are defined relative to world.


    When you use an offset, the offset is relative to your user frame so it moves as expected.


    Sent from my SM-G930V using Tapatalk

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners