Available values for LBL[?] and P[?] in FANUC R-J3 robot?

  • Hi, folks, how’s going?


    I try to edit a program on FANUC R-J3 robot. The original program is following:


    “…
    13: JMP LBL[1] ;
    14: ;
    15: LBL[10] ;
    16: ;
    17: UTOOL_NUM = 1 ;
    18: UFRAME_NUM = 0 ;
    19: ;
    20:J P[3] 100% CNT100 ;
    21: ;
    22:J P[10] 100% CNT100 ;
    23: ;
    24: Enter Tool(4) ;
    25: ;
    …”


    My questions are:
    1, if I want to add logic “JMP LBL [?] “, how can I know which values for [?] are available? 1 and 10 are already used.
    2, if I want to add line “J P[?] 100% CNT100 ”, how can I know which values for [?] are available as well?
    3, is that value [?] only factional in current program? I mean like there is one main program which will call two sub-programs, can I use P[11] in sub-program1 and P[11] in sub-program2 for different positions?



    Thanks a lot.

  • 1-10000 is the range for JMP LBL Commands. Jump commands are only specific to the program they are used in. If you use the same LBL in two different programs it will not jump to a different program. Same goes for p[ ]. When you add a new position it will automatically pick the next available P[] in that specific program.


  • 1, if I want to add logic “JMP LBL [?] “, how can I know which values for [?] are available? 1 and 10 are already used.


    You would have to do a search through your program and then log what was LBLs exist. There is no easy way to see at a glance what LBLs are in use when adding a JMP LBL command.


    When you add a LBL command, it will tell you if the label is in use when attempting to type one in that already exists.



    2, if I want to add line “J P[?] 100% CNT100 ”, how can I know which values for [?] are available as well?


    Pretty much same as above. However when you go to touch up a point that is used in multiple places, the controller will ask you if you want to make a new point. So if it asks, you know it exists elsewhere.



    3, is that value [?] only factional in current program? I mean like there is one main program which will call two sub-programs, can I use P[11] in sub-program1 and P[11] in sub-program2 for different positions?


    Yes, P positions are program specific in scope. P[11] in program 1 is completely different than P[11] in program 2. Touching up P[11] in program 1 will in no way affect P[11] in program 2.


    If you do want the points to be the same across programs (say a perch position for a machine), that is when you would use position registers. If you used PR[11] in program 1 and 2, and you touched it up in program 2, the touch up would show up in program 1 as well.


    You have to be careful to always declare the same usertool and userframe when using PRs though, as they are usertool and userframe agnostic and will use whatever is active at the time the move is preformed. Not doing this will usually result in a crash, or if you are lucky, a position not reachable fault.



    1-10000 is the range for JMP LBL Commands. Jump commands are only specific to the program they are used in. If you use the same LBL in two different programs it will not jump to a different program. Same goes for p[ ]. When you add a new position it will automatically pick the next available P[] in that specific program.


    1-32665 is the range for jump labels on newer controllers.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • LBL[] and P [] number are only related to the current program.


    If you try to use an existing number for for LBL, a ? or ! will appear beside the tag.



    Envoyé de mon SGH-I747M en utilisant Tapatalk

    If it starts well the first time, you have not checked all !

Advertising from our partners