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

Pallet Program Fanuc using PR

  • vipinpunneri
  • August 18, 2021 at 8:37 PM
  • Thread is Unresolved
  • vipinpunneri
    Reactions Received
    6
    Trophies
    4
    Posts
    137
    • August 18, 2021 at 8:37 PM
    • #1

    Hello All,

    i have recently created a palletizing program with the help for PR and Registers. i have attached the program copy for your reference hope you may need this.


    Application program.

    1: CALL PALLET_START ;

    2:J PR[12:PICK] 10% FINE Offset,PR[13:PICK Z OFFSET] ;

    3:J PR[12:PICK] 10% FINE ;

    4: CALL GRIP ;

    5:J PR[12:PICK] 10% FINE Offset,PR[13:PICK Z OFFSET] ;

    6: CALL PALLET_END ;

    Pallet start program

    1: UFRAME_NUM=0 ;

    2: UTOOL_NUM=1 ;

    3: PR[5:PR[2]-PR[1]]=PR[2:LastROW 1Col 1LY]-PR[1:1ROW 1COL 1LAY] ;

    4: PR[6:PR[3]-PR[1]]=PR[3:1ROW LasCol 1LY]-PR[1:1ROW 1COL 1LAY] ;

    5: PR[7:PR[4]-PR[1]]=PR[4:1Row 1Col TopLY]-PR[1:1ROW 1COL 1LAY] ;

    6: ;

    7: R[20:2-1,X]=(PR[5,1:PR[2]-PR[1]]) ;

    8: R[21:2-1,Y]=(PR[5,2:PR[2]-PR[1]]) ;

    9: R[22:3-1,X]=(PR[6,1:PR[3]-PR[1]]) ;

    10: R[23:3-1,Y]=(PR[6,2:PR[3]-PR[1]]) ;

    11: R[24:Z DIFF]=PR[7,3:PR[4]-PR[1]] ;

    12: ;

    13: IF (R[1:ROWS]=1 AND R[2:COLUMS]=1 AND R[3:LAYER]=1),JMP LBL[100] ;

    14: ;

    15: IF R[1:ROWS]>1,JMP LBL[25] ;

    16: IF (R[1:ROWS]=1),R[25:X PITCH IN ROW]=(R[20:2-1,X]) ;

    17: IF (R[1:ROWS]=1),R[26:Y PITCH IN ROW]=(R[21:2-1,Y]) ;

    18: ;

    19: JMP LBL[26] ;

    20: LBL[25] ;

    21: R[25:X PITCH IN ROW]=((R[20:2-1,X])/(R[1:ROWS]-1)) ;

    22: R[26:Y PITCH IN ROW]=((R[21:2-1,Y])/(R[1:ROWS]-1)) ;

    23: ;

    24: LBL[26] ;

    25: IF R[2:COLUMS]>1,JMP LBL[27] ;

    26: IF (R[2:COLUMS]=1),R[27:X PITCH IN COL]=(R[22:3-1,X]) ;

    27: IF (R[1:ROWS]=1),R[28:Y PITCH IN COL]=(R[23:3-1,Y]) ;

    28: ;

    29: JMP LBL[28] ;

    30: LBL[27] ;

    31: ;

    32: ;

    33: R[27:X PITCH IN COL]=((R[22:3-1,X])/(R[2:COLUMS]-1)) ;

    34: R[28:Y PITCH IN COL]=((R[23:3-1,Y])/(R[2:COLUMS]-1)) ;

    35: ;

    36: ;

    37: LBL[28] ;

    38: IF R[3:LAYER]>1,JMP LBL[30] ;

    39: ;

    40: IF (R[3:LAYER]=1),R[29:Z PITCH]=(0) ;

    41: ;

    42: JMP LBL[29] ;

    43: LBL[30] ;

    44: R[29:Z PITCH]=((R[24:Z DIFF])/(R[3:LAYER]-1)) ;

    45: LBL[29] ;

    46: ;

    47: LBL[100] ;

    48: PR[12:PICK]=PR[1:1ROW 1COL 1LAY] ;

    49: IF (R[1:ROWS]=1 AND R[2:COLUMS]=1 AND R[3:LAYER]=1),JMP LBL[3] ;

    50: PR[8,1:ROW PITCH]=R[25:X PITCH IN ROW] ;

    51: PR[8,2:ROW PITCH]=R[26:Y PITCH IN ROW] ;

    52: PR[9,1:COL PITCH]=R[27:X PITCH IN COL] ;

    53: PR[9,2:COL PITCH]=R[28:Y PITCH IN COL] ;

    54: PR[10,3:LAYER PITCH]=R[29:Z PITCH] ;

    55: ;

    56: ;

    57: PR[8,1:ROW PITCH]=((PR[8,1:ROW PITCH])*(R[10:CURR ROW]-1)) ;

    58: PR[8,2:ROW PITCH]=((PR[8,2:ROW PITCH])*(R[10:CURR ROW]-1)) ;

    59: PR[9,1:COL PITCH]=((PR[9,1:COL PITCH])*(R[11:CURR COL]-1)) ;

    60: PR[9,2:COL PITCH]=((PR[9,2:COL PITCH])*(R[11:CURR COL]-1)) ;

    61: PR[10,3:LAYER PITCH]=((PR[10,3:LAYER PITCH])*(R[12:CURR LAY]-1)) ;

    62: ;

    63: PR[11:TOTAL OFFSET]=PR[8:ROW PITCH]+PR[9:COL PITCH]+PR[10:LAYER PITCH] ;

    64: PR[12:PICK]=PR[12:PICK]+PR[11:TOTAL OFFSET] ;


    pallet end program

    1: ;

    2: R[10:CURR ROW]=R[10:CURR ROW]+1 ;

    3: IF R[10:CURR ROW]>R[1:ROWS],JMP LBL[1] ;

    4: JMP LBL[110] ;

    5: LBL[1] ;

    6: R[10:CURR ROW]=1 ;

    7: R[11:CURR COL]=R[11:CURR COL]+1 ;

    8: IF R[11:CURR COL]>R[2:COLUMS],JMP LBL[101] ;

    9: JMP LBL[110] ;

    10: LBL[101] ;

    11: R[10:CURR ROW]=1 ;

    12: R[11:CURR COL]=1 ;

    13: IF (R[99:0=PAL 1=DEPAL]=0),R[12:CURR LAY]=(R[12:CURR LAY]+1) ;

    14: IF (R[99:0=PAL 1=DEPAL]=1),R[12:CURR LAY]=(R[12:CURR LAY]-1) ;

    15: IF (R[99:0=PAL 1=DEPAL]=0),JMP LBL[80] ;

    16: IF (R[99:0=PAL 1=DEPAL]=1),JMP LBL[81] ;

    17: ;

    18: LBL[80] ;

    19: IF R[12:CURR LAY]>R[3:LAYER],JMP LBL[99] ;

    20: JMP LBL[110] ;

    21: LBL[81] ;

    22: IF R[12:CURR LAY]<=0,JMP LBL[99] ;

    23: ;

    24: ;

    25: ;

    26: JMP LBL[110] ;

    27: LBL[99] ;

    28: R[10:CURR ROW]=1 ;

    29: R[11:CURR COL]=1 ;

    30: IF (R[99:0=PAL 1=DEPAL]=0),R[12:CURR LAY]=(1) ;

    31: IF (R[99:0=PAL 1=DEPAL]=1),R[12:CURR LAY]=(R[3:LAYER]) ;

    32: LBL[110] ;

    Pallet VAR program

    1: LBL[10] ;

    2: R[1:ROWS]=3 ;

    3: R[2:COLUMS]=4 ;

    4: R[3:LAYER]=2 ;

    5: R[99:0=PAL 1=DEPAL]=1 ;

    6: IF R[1:ROWS]<1,JMP LBL[1] ;

    7: IF R[2:COLUMS]<1,JMP LBL[2] ;

    8: IF R[3:LAYER]<1,JMP LBL[3] ;

    9: ;

    10: JMP LBL[99] ;

    11: LBL[1] ;

    12: UALM[1] ;

    13: JMP LBL[10] ;

    14: LBL[2] ;

    15: UALM[2] ;

    16: JMP LBL[10] ;

    17: LBL[3] ;

    18: UALM[3] ;

    19: JMP LBL[10] ;

    20: LBL[99] ;

    21: R[10:CURR ROW]=1 ;

    22: R[11:CURR COL]=1 ;

    23: IF (R[99:0=PAL 1=DEPAL]=0),R[12:CURR LAY]=(1) ;

    24: IF (R[99:0=PAL 1=DEPAL]=1),R[12:CURR LAY]=(R[3:LAYER]) ;

    Pallet Init program

    1: R[1:ROWS]=0 ;

    2: R[2:COLUMS]=0 ;

    3: R[3:LAYER]=0 ;

    4: R[10:CURR ROW]=0 ;

    5: R[11:CURR COL]=0 ;

    6: R[12:CURR LAY]=0 ;

    7: R[20:2-1,X]=0 ;

    8: R[21:2-1,Y]=0 ;

    9: R[22:3-1,X]=0 ;

    10: R[23:3-1,Y]=0 ;

    11: R[24:Z DIFF]=0 ;

    12: R[25:X PITCH IN ROW]=0 ;

    13: R[26:Y PITCH IN ROW]=0 ;

    14: R[27:X PITCH IN COL]=0 ;

    15: R[28:Y PITCH IN COL]=0 ;

    16: R[29:Z PITCH]=0 ;

    17: PR[99,1]=0 ;

    18: PR[99,2]=0 ;

    19: PR[99,3]=0 ;

    20: PR[99,4]=0 ;

    21: PR[99,5]=0 ;

    22: PR[99,6]=0 ;

    23: PR[5:PR[2]-PR[1]]=PR[99] ;

    24: PR[6:PR[3]-PR[1]]=PR[99] ;

    25: PR[7:PR[4]-PR[1]]=PR[99] ;

    26: PR[8:ROW PITCH]=PR[99] ;

    27: PR[9:COL PITCH]=PR[99] ;

    28: PR[10:LAYER PITCH]=PR[99] ;

    29: PR[11:TOTAL OFFSET]=PR[99] ;

    30: PR[12:PICK]=PR[99] ;

    31: PR[13:PICK Z OFFSET]=PR[99] ;


    Vipin:smiling_face::smiling_face:

    Files

    Pallet Program Guide.pdf 643.78 kB – 62 Downloads

    Thanks regards<br />Vipin..

  • Fabian Munoz
    Reactions Received
    134
    Trophies
    9
    Articles
    1
    Posts
    1,517
    • August 18, 2021 at 9:18 PM
    • #2

    Looks good, thanks for the contribution

    It would look nicer

    1) if you add comments (actually Remarks) indicating the actions

    2) name the labels

    Retired but still helping

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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • 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
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Tags

  • Fanuc
  • palletizing
  • pallet
  • Position Register
  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