I'm trying to save a UFrame into a PR with the statement PR[8]=UFrame[1]. The problem is that the robot is saving it in matrix form, I need it in cartesian. From this post https://www.robotforum.com/robotforum/fan…74370/#msg74370 it looks like I should be able to set $PR_CARTREP to true to solve the issue, but I can't find that variable in my controller (RJ3iB). How else can I get my UFrame saved to a PR?
Save UFrame to PR

TitusLepic 
May 17, 2016 at 4:22 PM 
Thread is marked as Resolved.


I'm trying to save a UFrame into a PR with the statement PR[8]=UFrame[1]. The problem is that the robot is saving it in matrix form, I need it in cartesian. From this post https://www.robotforum.com/robotforum/fan…74370/#msg74370 it looks like I should be able to set $PR_CARTREP to true to solve the issue, but I can't find that variable in my controller (RJ3iB). How else can I get my UFrame saved to a PR?Just taking a wild swing here, but when you taught the PR the first time, was it set to Joint or CART? What you do is, go into the PR, hit F5(ithink) and change representation to Cart.
I've never had to do that, but just a quick thought.

You can set a PR in cartesian representation using the statement PR[*] = LPOS or joint representation with PR[*]=JPOS.
Then assign your PR value to UFRAME[*]. 
I assign Cartesian PR values to UFrame all the time. The problem is going the other way, trying to save a UFrame to PR. Regardless of what representation the PR was originally saved in, PR[8]=UFrame[1] (or PR[8]=$MNUFRAME[1,1]) always results in PR[8] being saved as a matrix representation of the UFrame. I.e, instead of xyzwpr or joint angles, it's saved as NX NY NZ OX OY OZ AX AY AZ LX LY LZ.

Quote
The problem is going the other way, trying to save a UFrame to PR. Regardless of what representation the PR was originally saved in, PR[8]=UFrame[1] (or PR[8]=$MNUFRAME[1,1]) always results in PR[8] being saved as a matrix representation of the UFrame. I.e, instead of xyzwpr or joint angles, it's saved as NX NY NZ OX OY OZ AX AY AZ LX LY LZ.
Why not assigning values from each component of $MNUFRAME to the corresponding component of the position register ?
Also this can be done much easily using Karel if you have access to it. 
Thanks, I hadn't thought about doing it that way.
The more I learn about these robots, the more I think I'm going to need to learn Karel eventually.

Why not assigning values from each component of $MNUFRAME to the corresponding component of the position register ?
Also this can be done much easily using Karel if you have access to it.If you could tell me the TP code that does this, I would be very interested. I had a thread asking this question a while ago, but no answer outside of Karel.

The more I learn about these robots, the more I think I'm going to need to learn Karel eventually.Ditto here  that and BGLogic.

Do this all the time. 3 steps, no Karel
11 $PR_CARTREP = 1
12 PR[30:UF1] = UFRAME [1]
13 $PR_CARTREP = 0The new V8.30 robots don't like PR_CARTREP set high all the time, hense the setting it back to "false".