Advertising

Hello with a few questions

  • Hello All,


    I am currently an instructor at a community college. I was teaching in the electrical and Heating fields, but over the summer one of our former instructors passed away unexpectedly. So now I have been tasked to become a certified fanuc instructor. My previous background with fanuc or any other robot is little to none. I have been through a simple teach pendant class fanuc offers, and it was very very good. At the college we currently have 3, R-30ia, 2, R-3iB, 2,R-30ib arc mates, and an M10. I am trying to create a program for my students "using one of the R-30iA robots" that involves picking and placing a part. I would like to do this 3 times while only teaching the pick and place instruction once. I know this must be done with PR instructions and every time I have made a move the TP throws a motion fault telling me it cannot reach the point. You should see an example below of my sample program. I have tried teaching the PR the location. I have run out of ideas to fix this as my knowledge is limited. I appreciate any help.


    SRVO-003 Deadman switch released

    APPROACH LINE 2 \T1\ PAUSED \\\\\\\\\\S/USER\100\%

    APPROACH\\\\\\\\\\\\\\\\\\\\\\\\\

    PAUSED 2/7

    1: LBL[1]

    \\\2:

    3:J @P[1] 100% FINE

    : Offset,PR[20:ABOVE PICK]

    4:L P[2] 250mm/sec FINE

    : Offset,PR[20:ABOVE PICK]

    5:L @P[1] 250mm/sec FINE

    : Offset,PR[20:ABOVE PICK]

    6: JMP LBL[1]

    [End]

  • (FYI, I moved this to the main Fanuc forum. You had it in the tools section. )



    You really only want 1 Point instead of 2, so change line 4 to P[1]. Line 4 also should not have the offset applied, so delete the "offset, PR[20]" from that line. Then jog the robot where you want it to pick and touch up P[1] on line 4. Finally go to the position register menu and directly modify PR[20]. Change all values to 0 except the value you want for your approach/retreat offset. Usually this is Z+. If that is the case then make the Z a positive value, enough to clear the part.


    This will repeat infinitely because you don't have a condition to break out of your jump labels. To repeat only 3 times you need to implement a counter and then only jump back to label 1 if your counter is less than 3. The other option is to use a For Loop instead of jump labels. Some of the older controller models don't have the For Loop option.

  • That worked well Thanks again for the help. Now when I want to move that position using PR[i,j] =PR[i,j]+ constant why does the robot not move. For example i have the following below. I would like for the robot to move in a cartesian movement in the X positive direction 57.15mm to check and see if a part is available. when it get there the robot does not do anything and the program starts all over again. thank you again for assistance

    1: PR[22:PART ON PICK]=PR[22:PART ON PICK]-PR[22:PART ON PICK] ;

    2: ;

    3:J P[2] 100% FINE Offset,PR[22:PART ON PICK] ;

    4:J P[1] 100% FINE ;

    5: IF RI[1]=OFF,JMP LBL[2] ;

    6:J P[1] 100% FINE Offset,PR[22:PART ON PICK] ;

    7: IF RI[1]=ON,CALL PICK ;

    8: ;

    9: LBL[2] ;

    10: PR[22,1:PART ON PICK]=PR[22,1:PART ON PICK]+57.15 ;

  • You are modifying the X value on line 10, but then your program ends. (I assume it ends after line 10?)


    Then I assume you run the program again, but on line 1 it clears the value back to 0.


    After line 10 you are probably intending to jump back in after line 1, so you would need to add a Jump label on line 11 and a label on line 2. If you do this it will keep searching in the x direction indefinitely, which eventually could crash or reach a joint limit. So to prevent this you need to have the program check the x value and if it gets too high, reset it back to 0.

  • Here is some simple program templates.


    1: ! =============================== ;

    1: LBL[1] ;

    2: ;

    3: R[3:Counter]=R[3:Counter]+1 ;

    4: ;

    5: IF R[3:Counter]=1, JMP LBL[10] ;

    6: IF R[3:Counter]=2, JMP LBL[20] ;

    7: IF R[3:Counter]=3, JMP LBL[30] ;

    8: JMP LBL[999] ;

    9: ;

    10: LBL[10] ;

    11: PR[1,1:TEST]=0 ;

    12: JMP LBL[100] ;

    13: ;

    14: LBL[20] ;

    15: PR[1,1:TEST]=50 ;

    16: JMP LBL[100] ;

    17: ;

    18: LBL[30] ;

    19: PR[1,1:TEST]=100 ;

    20: JMP LBL[100] ;

    21: ;

    22: LBL[100] ;

    23: ;

    24:L P[1] 100mm/sec FINE Offset,PR[1:TEST] ;

    25: ;

    26: IF R[3:Counter]<3, JMP LBL[1] ;

    27: ;

    28: LBL[999] ;

    29: END ;



    1: ! =============================== ;

    1: PR[1,1]=(-50) ;

    2: ;

    3: LBL[1] ;

    4: ;

    5: R[3:Counter]=R[3:Counter]+1 ;

    6: ;

    7: PR[1,1]=PR[1,1]+50 ;

    8: ;

    9:L P[1] 100mm/sec FINE Offset,PR[1] ;

    10: ;

    11: IF R[3:Counter]<3, JMP LBL[1] ;

    12: ;

    13: END ;



    1: ! =============================== ;

    1: R[3:Counter]=(-1) ;

    2: ;

    3: LBL[1] ;

    4: ;

    5: R[3:Counter]=R[3:Counter]+1 ;

    6: ;

    7: PR[1,1]=R[3:Counter]*50 ;

    8: ;

    9:L P[1] 100mm/sec FINE Offset,PR[1] ;

    10: ;

    11: IF R[3:Counter]<2, JMP LBL[1] ;

    12: ;

    13: END ;

  • to move the robots with offsets we use a small program with ARs to keep the main programs clean as possible.


    In this case you need 1 position and 1 position register, and call the "set_offs" program before you move, to set PR[100] with argument registers.



    5: ! move to press position 9 ;

    6: ;

    7: CALL SET_OFFS(0,(-50),5,0,0,0) ;

    8:L P[1] 150mm/sec CNT60 Offset,PR[100] ;

    9: CALL SET_OFFS(0,0,5,0,0,0) ;

    10:L P[1] 150mm/sec CNT50 Offset,PR[100] ;

    11:L P[1] 50mm/sec FINE ;


    and the called set_offs program is:

    1: !---------------------- ;

    2: ! SET OFFSET IN PR[100] ;

    3: !---------------------- ;

    4: ! ;

    5: PR[100,1]=AR[1] ;

    6: PR[100,2]=AR[2] ;

    7: PR[100,3]=AR[3] ;

    8: PR[100,4]=AR[4] ;

    9: PR[100,5]=AR[5] ;

    10: PR[100,6]=AR[6] ;



    so you can set the value of PR[100] directly with AR[1-6]


    just my 2cents :)

  • I do the same thing. Keeping some PR's just for Offset use.


    ! Z 50mm up

    CALL OFFSET(25,0,0,50,0,0,0) <-- this calls the sub below.

    J P[1:Pick] 100% CNT10 Offset,PR[25:OFFSET1] VOFFSET,VR[1]



    !Sub OFFSET

    1: //$ssr.$singlestep=0 ;

    2: --eg:First Argument is which PR

    : to write. The remainder are

    : x,y,z,w,p,r ;

    3: R[22:TEMP2]=AR[1] ;

    4: PR[R[22],1]=AR[2] ;

    5: PR[R[22],2]=AR[3] ;

    6: PR[R[22],3]=AR[4] ;

    7: PR[R[22],4]=AR[5] ;

    8: PR[R[22],5]=AR[6] ;

    9: PR[R[22],6]=AR[7] ;

    10: //$ssr.$singlestep=1 ;

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