User frames from Position Registers

  • Hello all,


    I'm trying to set a user frame for a weld fixture based on 3 points found with a laser sensor. I would like to use those points to set a user frame just like as if I was teaching the user frame using the 3 point method. Has anyone done this?

  • AD
  • I have done something like that but it's not as easy as you think. There isn't a way that I am aware of to use the 3 point method directly in a program. Instead you have to do all the math to calculate the user frame yourself.


    If you just need to update x,y,z or x,y,r you can do it with 3 points from the laser. If you need full x,y,z,w p,r then you must probe 6 points with the laser. Then comes the trigonometry. It is completely doable if you can handle the math.

  • I have done this utilizing a Fanuc option, R518 iRcalibration frame


    ScreenHunter 330.jpg


    you can find info in the V9.30 R-30iB manual, section 16, iRcalibration options.

    you have to "touch" 6 points (you should be able to use your laser). two on one side of fixture, one on another side, and three on the surface. You follow the setup procedure and teach VIA (approach) points and points to search to, then the software creates the program. Mine created a new frame every time, didn't shift the frame.

  • You should be able to do this from three points. I haven't done it myself, but if I were to attempt it here's what I'd do:


    1) PR[x]=UFRAME[x] - this sets the chosen PR to matrix representation

    2) Set the 10th, 11th, and 12th positions of PR[x] to the XYZ of your origin.

    3) Find the unit vector pointing from the origin to the "X" point. Set the 1st, 2nd, and 3rd positions of PR[x] to this unit vector

    4) Find the vector pointing from the origin to the "Y" point. Take the cross product of this vector and the X direction vector. Scale it to be a unit vector. This is your Z direction unit vector, set the 7th, 8th, and 9th positions of PR[x] to this unit vector.

    5) Take the cross product of the X and Z vectors. Scale it to be a unit vector. Set the 4th, 5th, and 6th positions of PR[x] to this value.

    6) UFRAME[x] = PR[x]


    Like HawkME said, it is completely doable if you can handle the math.

  • Or, if you have Karel, you can use the FRAME built-in to create a frame from 3 points. The following code sets UF[1] based on three taught points.


    Code
    $MNUFRAME[1,1] = FRAME(origLoc,xLoc,yLoc) 

    Caveat is that your PRs need to be taught in world frame or the UF won't be where you expect.

  • Hello TitusLepic


    I am trying to follow your methodology, but I am facing some difficulties.

    1) PR[9]=UFRAME[9], even running this line, the PR[9] does not take matrix representation.

    Can you help with that please?

    Thank you

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now