1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Fanuc Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Hello with a few questions

  • daviscfad
  • October 9, 2019 at 7:19 PM
  • Thread is Unresolved
  • daviscfad
    Trophies
    3
    Posts
    5
    • October 9, 2019 at 7:19 PM
    • #1

    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]

  • HawkME October 9, 2019 at 7:37 PM

    Moved the thread from forum Manuals, Software and Tools for Fanuc Robots (you should look here first before posting) to forum Fanuc Robot Forum.
  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • October 9, 2019 at 7:45 PM
    • #2

    (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.

  • daviscfad
    Trophies
    3
    Posts
    5
    • October 9, 2019 at 7:48 PM
    • #3

    Thank you hawk! I am sorry for posting in the wrong section. I am going to give this a try

  • daviscfad
    Trophies
    3
    Posts
    5
    • October 9, 2019 at 9:57 PM
    • #4

    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 ;

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • October 9, 2019 at 10:34 PM
    • #5

    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.

  • jptp
    Trophies
    4
    Posts
    9
    • October 10, 2019 at 8:12 PM
    • #6

    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 ;

  • moln4r
    Reactions Received
    6
    Trophies
    2
    Posts
    128
    • October 11, 2019 at 3:27 PM
    • #7

    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 :smiling_face:

  • Robot Programmer
    Reactions Received
    5
    Trophies
    3
    Posts
    26
    • October 11, 2019 at 5:17 PM
    • #8

    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 ;

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download