Hi,
I use Robguide to import PR's from a real Robot, and then save from robot to POSREG.va in order to able to work with in my laptop,
I would like the exported POSREG.va be in Matrix format, is that possible?
Thank you
Hi,
I use Robguide to import PR's from a real Robot, and then save from robot to POSREG.va in order to able to work with in my laptop,
I would like the exported POSREG.va be in Matrix format, is that possible?
Thank you
I don't believe so.
You could try it with the system variable $PRCARTREP set to FALSE.
I don't know of any Fanuc utility for that. It's entirely possible to write your own, but you'd have to determine the conversion formula between Fanuc Pos and Matrix notation.
MOM did some great work in this area in this thread: RE: General conversion between different coordinate system types (KUKA, Fanuc, ABB, etc)
You could try it with the system variable $PRCARTREP set to FALSE.
Already tried, and it in the TP it shows them in Matrix format, but when exporting POSREG.va the format is put back to xyzwpr.
Thanks anyway
Hi MoEL,
posreg.va always shows a 'position' type(Matrix format) as a XYZWPR type!
I think on newer controllers there is really no need to use the 'position' type.
Change the $PRCARTREP var to true, at start of commisioning , and you're fine.
So, out of curiosity, I just tried playing with $PR_CARTREP on a v9.3 robot in RoboGuide, and it doesn't seem to have any effect on either POSREG.VA or on the pendant display of the PR positions. Everything is still XYZWPR, regardless of which value $PR_CARTREP has. I also tried Cold booting after each change, but it still had no effect.
With $PR_CARTREP = False, try:
PR[X]=UFRAME[Y]
It should store the value in a 3x4 matrix.
Ah, so it's not a "display" control, but a "write" control.
Yep, that worked. Once I set $PR_CARTREP to False (no reboot), and did a PR[x]=UFrame[y], the PR display changed from XYZWPR to NX, NY,NZ,OX,OY,OZ.
Although... this seems to be a matrix notation I'm not familiar with. Normally I see the Matrix translation of a 6DOF position as a 4x4 matrix, and this is only a a 3x2. I'm guessing that the OX, OY, and OZ are the... unit vectors? In the 4x4 matrix, each Rotation is represented by 3 values in a column, and IIRC those three values can be combined into a single unit vector.
Yep, that worked. Once I set $PR_CARTREP to False (no reboot), and did a PR[x]=UFrame[y], the PR display changed from XYZWPR to NX, NY,NZ,OX,OY,OZ.
Did you check POSREG.VA after that to see if it changed or if it is still in XYZWPR format?
Although... this seems to be a matrix notation I'm not familiar with. Normally I see the Matrix translation of a 6DOF position as a 4x4 matrix, and this is only a a 3x2. I'm guessing that the OX, OY, and OZ are the... unit vectors? In the 4x4 matrix, each Rotation is represented by 3 values in a column, and IIRC those three values can be combined into a single unit vector.
It's a 3x4, hit F2 (PAGE) to see the rest of the values. The N,O, and A values are your unit vectors and the L values are position.
Looks like there isn't a way to export the points as matrix rep.
Here is some code that may help. In my position convertor utility, I convert XYZWPR internally to matrix form.
using System;
using MathNet.Numerics.LinearAlgebra;
namespace FanucUtilities
{
public Matrix<double> ConvertXYZWPRtoMatrix(double[] input)
{
Matrix<double> ResultMatrix = Matrix<double>.Build.DenseIdentity(4, 4);
Matrix<double> rX = Matrix<double>.Build.DenseIdentity(4, 4);
Matrix<double> rY = Matrix<double>.Build.DenseIdentity(4, 4);
Matrix<double> rZ = Matrix<double>.Build.DenseIdentity(4, 4);
double x = input[0];
double y = input[1];
double z = input[2];
double w = input[3];
double p = input[4];
double r = input[5];
//R
rZ[0, 0] = Math.Cos(r);
rZ[0, 1] = -Math.Sin(r);
rZ[1, 0] = Math.Sin(r);
rZ[1, 1] = Math.Cos(r);
//P
rY[0, 0] = Math.Cos(p);
rY[0, 2] = Math.Sin(p);
rY[2, 0] = -Math.Sin(p);
rY[2, 2] = Math.Cos(p);
//W
rX[1, 1] = Math.Cos(w);
rX[1, 2] = -Math.Sin(w);
rX[2, 1] = Math.Sin(w);
rX[2, 2] = Math.Cos(w);
ResultMatrix = rZ * rY * rX;
ResultMatrix[0, 3] = x;
ResultMatrix[1, 3] = y;
ResultMatrix[2, 3] = z;
return ResultMatrix;
}
}
Display More
It's a 3x4, hit F2 (PAGE) to see the rest of the values. The N,O, and A values are your unit vectors and the L values are position.
Oh ho! I just kept trying to arrow-key my way through.
Hm... and apparently this has issues with the Password protection. I happened to be logged in at the lowest level, and I could pull up the PR Position, but using the Page button generated a user-permission error. I had to log in higher just to see the second page of the matrix. Oh, Fanuc....