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

How to make a good PNS ?!?!

  • d.kerekes
  • November 23, 2018 at 3:55 PM
  • Thread is Resolved
  • d.kerekes
    Reactions Received
    2
    Trophies
    3
    Posts
    16
    • November 23, 2018 at 3:55 PM
    • #1

    Hello Guys!

    I tried to make a "main" program, but I had an issue. In the first level , I want to choose the type of product, second level what to do with the product ( this is necessary, because, if the robot stops meanwhile the production , in this case we should start the robot from the middle of his cycle ) .
    In the third level will be the programs, whit the movements .
    If the robot finished his third level program, the program jump back to the second level, is it possible, to jump form the third level to the first one ?
    Thanks for the answers !!!

    Level1:

    IF DO[125:ON ]=ON,JMP LBL[1] ;
    3: UALM[1] ;
    4: ABORT ;
    5: LBL[1] ;
    6: WAIT DI[125:OFF]=ON ;
    7: R[150]=GI[50:0] ;
    8: ;
    9: SELECT R[150]=1,CALL P1 ;
    10: =2,CALL P2 ;
    11: =3,CALL P3 ;
    12: ELSE,CALL ABORT ;
    13: JMP LBL[1] ;

    Level2: Actually this is the Program "P1"
    1:
    2:
    3: R[151]=GI[51:0] ;
    4: ;
    5: IF (R[151]=1)) THEN ;
    6: CALL P1_1 ;
    7: ELSE ;
    8: ENDIF ;
    9: ;
    10: IF (R[151]=2)) THEN ;
    11: CALL P1_2 ;
    12: ELSE ;
    13: ENDIF ;

    Level3: Actually this is the Program "P1_1"

    1:J P[HOME2] 100% CNT100 ;

    2:UTOOL_NUM= ;
    3:UFRAME_NUM= ;
    4:WAIT DI[102:AREA_ST02]=ON ;
    5:DO[102:AREA_ST02]=ON ;
    6:CALL GRP1_CLOSE ;

    7:J P[1] 100% CNT100 ;
    8:J P[2] 100% CNT100 ;
    9:J P[3] 100% CNT100 ;

    !FRAME DROP POSITION IN ST02 POS1 ;
    10:L PR[4:DROP_FR_ST2_P1] 500mm/sec FINE ;
    11:CALL GRP1_OPEN ;

    !DRIVE UP IN "Z" AFTER DROP POSITION ;
    12:PR[X]=LPOS ;
    13:PR[X,3]=PR[X,3]+80 ;
    14:L PR[X] 500mm/sec CNT100 ;

    15:J P[5] 100% CNT100 ;
    16:J P[6] 100% CNT100 ;

    17:J P[HOME1] 100% CNT100 ;

    18:DO[102:AREA_ST01]=OFF ;

    /END

  • Fabian Munoz
    Reactions Received
    133
    Trophies
    9
    Articles
    1
    Posts
    1,517
    • November 23, 2018 at 6:14 PM
    • #2

    HI
    At the end of
    15:J P[5] 100% CNT100 ;
    16:J P[6] 100% CNT100 ;

    17:J P[HOME1] 100% CNT100 ;

    18:DO[102:AREA_ST01]=OFF ;

    R[1]=3 Use a register and just put any value


    then on
    1:
    2:
    3: R[151]=GI[51:0] ;
    4: ;
    5: IF (R[151]=1)) THEN ;
    6: CALL P1_1 ;
    if r[1] = 3 jump label 99
    7: ELSE ;
    8: ENDIF ;
    9: ;
    10: IF (R[151]=2)) THEN ;
    11: CALL P1_2 ;
    12: ELSE ;
    13: ENDIF ;

    label 99

    /END


    basically you just go through p1,, do something similar for p2

    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
  • 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