Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 01:14:22 PM
Home Help Login Register
News: Any Problems or Experience with Industrial Robots ?
Register and place your Question / Answer to worldwide Robotexperts right here !

+  Robotforum | Support for Robotprogrammer and Users
|-+  Industrial Robot Help and Discussion Center
| |-+  Yaskawa Motoman Robot Forum (Moderators: Fabian Munoz, Napierian)
| | |-+  Search origin with MFRAME
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Search origin with MFRAME  (Read 577 times)
Paolo
Full Member
***
Offline Offline

Posts: 214


« on: January 16, 2012, 03:12:17 PM »

Hello.

Knowing the position of the robot in points 1/2/3 in the example shown, from time to time as I can find the origin of the frame using MFRAME?
I accept all the suggestions of techniques possible with MFRAME.

Thank you very much  kopfkratz

Logged
Paolo
Full Member
***
Offline Offline

Posts: 214


« Reply #1 on: January 16, 2012, 04:46:26 PM »

   Huh?

Does anyone have any technique?
« Last Edit: January 16, 2012, 07:33:29 PM by Paolo » Logged
Paolo
Full Member
***
Offline Offline

Posts: 214


« Reply #2 on: January 17, 2012, 11:52:11 AM »

  
Logged
Paolo
Full Member
***
Offline Offline

Posts: 214


« Reply #3 on: January 18, 2012, 08:50:21 AM »

No one has tips?
Logged
motomichael
Newbie
*
Offline Offline

Gender: Male
Posts: 13


« Reply #4 on: January 18, 2012, 12:17:07 PM »

Hi!

What do you mean by "position of the robot"? If "position" is coordinates in some frame, then the point (0,0,0) is the origin of that frame. Or I've got something wrong?

Regards,
Michael
Logged
Paolo
Full Member
***
Offline Offline

Posts: 214


« Reply #5 on: January 18, 2012, 01:40:50 PM »

I need to dynamically set the FRAME.
The orientation of the figure on display changes every time.
Moving with the robot, I can figure out where are the points 1,2,3.
When these are known locations of the robot, I'd like to use to set each time the MFRAME.
What technique can I use to dynamically recalculate MFRAME?

Logged
Paolo
Full Member
***
Offline Offline

Posts: 214


« Reply #6 on: January 19, 2012, 11:41:35 AM »

   bawling  Huh?
Logged
smurrill73
Newbie
*
Offline Offline

Posts: 10


« Reply #7 on: January 19, 2012, 03:00:46 PM »


Paolo,

If you know the Origin, XX, and XY coordinates for the user frame, you can put these points into P-variables, then use the MFRAME instruction to set the user frame:

MFRAME UF#(1) PX010 PX011 PX012

You would probably want to take some sort of precautions to make sure those points are reachable and will not cause collisions.

Hope this helps,
Scott
Logged
Paolo
Full Member
***
Offline Offline

Posts: 214


« Reply #8 on: January 19, 2012, 03:07:50 PM »

Yes, but I do not know ORG.
My problem is that I calculate ORG
Logged
motomichael
Newbie
*
Offline Offline

Gender: Male
Posts: 13


« Reply #9 on: January 19, 2012, 04:51:01 PM »

Well, it seems that I got the point.

Actually, if the part is flat and parallel to plane Z=0 in the base frame, then two points will be enough.

Suppose you know the positions of points in the base frame, let them be (x1,y1) and (x2,y2). Construct the frame such that both points lies on one of its X axis; then Y axis must be perpendicular to the first one.  Put the frame origin into the point 1; now you must find some point of Y axis, let it be (x3,y3) (x3 and y3 are unknown yet).

(1) such a point must satisfy the following equation:

(x3 - x1) * (x2 - x1) + (y3 - y1) * (y2 - y1) = 0

This express the fact that scalar product of orthogonal vectors is 0.

(2) Now you have 1 equation with 2 unknown quantities. Fix the distance between (x1,y1) and (x3,y3), let it be d:

(x3 - x1)^2 + (y3 - y1)^2 = d^2.

Denote x3 - x1 as dx, y3 - y1 as dy; then

dx * (x2 - x1) + dy * (y2 - y1) = 0;
dx^2 + dy^2 = d^2.

Then

(d^2 - dy^2) * (x2 - x1)^2 = dy^2 * (y2 - y1)^2;
dx^2 = d^2 - dy^2,

=>

dy = (- (x2 - x1)^2 +- sqrt((x2-x1)^4 + 4 * (y2 - y1)^2 * d^2 * (x2 - x1)^2)) / (2 * (y2 - y1)^2);
dx = sqrt(d^2 - dy^2).

(Recheck math, please)

Solutions with plus and minus correspond to points, which lie on the different sides w.r.t. X axis.

(3) Now you know (x1,y1), (x2,y2) and (x3,y3) = (x1 + dx, y1 + dy) (they all are in the base frame).

GETS PX000 $PX001
SUB PX000 PX000
SETE P000 (1) x1
SETE P000 (2) y1
' P001 is (x1,y1)
SET P001 P000
SETE P000 (1) x2
SETE P000 (2) y2
' P002 is (x2,y2)
SET P002 P000
SETE P000 (1) x3
SETE P000 (2) y3
' P003 is (x3,y3)
SET P003 P000
MFRAME UF#(1) P001 P002 P003

Now UF#(1) is linked with your part; you can define another frame with the origin in the point of part you like. You must know its coordinates in UF#(1). Be them (x0,y0), do the following:

GETS PX000 $PX000
' Work in UF#(1) rather than the base frame
CNVRT PX000 PX000 UF#1
SUB P000 P000
SETE P000 (1) x0
SETE P000 (2) y0
' origin at P001
SET P001 P000
SETE P000 (1) 100000
SETE P000 (2) y0
' XX at P002
SET P002 P000
SETE P000 (1) x0
SETE P000 (2) 100000
' XY at P003
SET P003 P000
MFRAME UF#(2) P001 P002 P003

UF#(2) has the origin in the desired point, and its X axis is parallel to line connecting point 1 with point 2.

I hope this will help.

Regards,
Michael

Logged
Paolo
Full Member
***
Offline Offline

Posts: 214


« Reply #10 on: January 19, 2012, 04:59:28 PM »

Ciao, parli italiano?
Logged
motomichael
Newbie
*
Offline Offline

Gender: Male
Posts: 13


« Reply #11 on: January 19, 2012, 05:09:18 PM »

Ciao!

No, only Russian  icon_smile

Michael
Logged
Paolo
Full Member
***
Offline Offline

Posts: 214


« Reply #12 on: January 19, 2012, 05:11:14 PM »

I can leave my email?
Logged
potis
Sr. Member
****
Offline Offline

Gender: Male
Posts: 307



« Reply #13 on: January 21, 2012, 09:07:08 AM »

Hello,

Paolo we have already answered your question in previous post.
http://www.robot-forum.com/robotforum/yaskawa_motoman_robot_forum/search_org_mframe-t8101.0.html;msg32809#msg32809
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!