How to copy the config of a PR using the syntax PR[X,7] = PR[Y,7]

  • Hello everyone,


    I am trying to make a simple statement. PR[29,7] = PR[59,7]


    When the program gets to this line, i get the next error: INTP-204 Invalid value for index


    I really have no idea why. can someone enlight me with something?


    Thank you!!!


    PS: both of my points are in cartesian representation so the error is not there.

  • Where did you get that picture from?


    As far as I know, 7 is for the 7th axis of group one. At least I know it is that way for every Fanuc I have programed with an extended axis in group one.


    -Phil

  • as R47 said, depends how you configure your 7th axis. If you 7th axis locates in group#1 together with robot, then you can get access to your axis using PR[*,7].
    In situation when you have 2 motion groups, then you syntax will be PR[*,1:G2]. From my experience with Fanuc on versions 7.* when I have multiple motion groups, then my syntax with position register was always with determine of required motion group.


    In newer versions of Fanuc controllers, you can do logic with positions,

    Code
    PR[*] = P[*]

    Edited once, last by scotty ().

  • Ok people thank you very much for all your support


    NOW I have a different question:


    I have a PR that is changing config to NUT 0,0,-1 and EVEN if I try to change the last -1 to 0 it will come back at -1. THE PROBLEM is that the same PR is used multiple times and the robot gets in out of reach because of this -1.


    DO YOU KNOW how could I override this CONFIG? is it possible?


    thanks again people

  • Depending on your application, you may be able to change the PR to joint representation and this may help with Config issues.


    Also, be careful posting Fanuc stuff on the forums. Fanuc is very informed of forums and social media that exists and they are on them as well and take their information very serious.

  • To deal with the -1 turn number you have two choices.


    1. Use only linear moves with that PR
    2. If you insist on issuing a joint move then add the MROT instruction to your motion.


    Either of these choices will tell the robot to take the minimum rotational path for the wrist.


  • Depending on your application, you may be able to change the PR to joint representation and this may help with Config issues.


    Also, be careful posting Fanuc stuff on the forums. Fanuc is very informed of forums and social media that exists and they are on them as well and take their information very serious.


    thank you I did not know it could be a problem. Won't do again!


  • To deal with the -1 turn number you have two choices.


    1. Use only linear moves with that PR
    2. If you insist on issuing a joint move then add the MROT instruction to your motion.


    Either of these choices will tell the robot to take the minimum rotational path for the wrist.


    I will try the MROT option since the mouvement is already in linear!


    thank you!!!

  • If it's already linear then you shouldn't need MROT. Linear automatically handles turn number changes which leads me to believe you have a different issue, such as NUT vs FUT config changes.


    I think you need to stop using that PR in so many different places. Instead use different PRs or multiple points with a PR offset.

  • in a PR the first 6 data are X, Y, Z, w, p, r,the 7th data is the "config" it is a record, containing the attitudes of the robot and the number of turns of the axes.

    These values are not directly accessible in TP.

    It is possible to do routines in KL.

    But the simplest is to make a point in the good "config" and copy it in the PR before loading each of the 6 values of positions (XYZwpr).

  • If it's already linear then you shouldn't need MROT. Linear automatically handles turn number changes which leads me to believe you have a different issue, such as NUT vs FUT config changes.


    I think you need to stop using that PR in so many different places. Instead use different PRs or multiple points with a PR offset.

    Finally the move was on Joint so the MROT solution worked greatly! Thank you very much lad! and I could not change the PR since I am in pallettool so it had to be that one in special.


    thanks again! cheers!

  • in a PR the first 6 data are X, Y, Z, w, p, r,the 7th data is the "config" it is a record, containing the attitudes of the robot and the number of turns of the axes.

    These values are not directly accessible in TP.

    It is possible to do routines in KL.

    But the simplest is to make a point in the good "config" and copy it in the PR before loading each of the 6 values of positions (XYZwpr).

    Damn I knew the 7 was the config and did not know how to get access to it! thanks for sharing the knowledge!

Advertising from our partners