if rotates 30 degrees around the X axis of the robot base coordinat,can use “point tp1=rx(30)” ,but how to write a program that rotates 30 degrees around the X axis of the user coordinate?how to use frame function in this?
write a program that rotates 30 degrees around the X axis of the user coordinate
-
alphifly -
September 7, 2017 at 8:48 AM -
Thread is marked as Resolved.
-
-
Use the TRANS command either in a location creation step, or direct motion.
- The problem you have is that you can transform to the target from multiple solutions.
- If you are conversant with the left rule of Kawasaki (OAT) specifically, then by using the TRANS command, any orientation can be achieved.
- Just remember O = Rz, A = Ry, T = Rz.LMOVE tp1+TRANS(0,0,0,90,-30,-90) = positive rotation around the X axis by 30 degrees.
LMOVE tp1+TRANS(0,0,0,90,30,-90) = negative rotation around the X axis by 30 degrees.Just be warned, as the OAT is calculated O then A then T (Rz then Ry then Rz), then it's not just case of putting in a simple degree value like you do with the RX command.
Hope this helps.
-
thanks!
but i difficulty understand using the oat rule for x axis rotation,can you have some other method for it.
user coordinate define: POINT UC1=FRAME(O1,X1,Y1,O1),then I need ratate 30 degrees with user coordinate axis。
can i use:
POINT TP1=UC1+RX(30) ? -
more:
if i use oat rule,Is the following program correct?
POINT UC1=FRAME(O1,X1,Y1,O1)
POINT ROT=TRANS(0,0,0,90,-30,-90)
HERE POSNOW
POINT TP1=UC1+ROT-UC1+POSNOW
LMOVE TP1 -
Yes that should work......
You could merge the trans angle in the location creation instruction:
POINT tp1 = uc1+trans(0,0,0,90,-30,-90)-uc1+posnow -
this sample with using oat is good idea,Could you check the following lines for me?
1、LMOVE tp1+TRANS(0,0,0,90,-30,-90) = positive rotation around the X axis by 30 degrees
2、LMOVE tp1+TRANS(0,0,0,0,-30,0) = positive rotation around the Y axis by 30 degrees
3、LMOVE tp1+TRANS(0,0,0,-30,0,0) = positive rotation around the Z axis by 30 degreesthanks
-
I consider the TRANS the most powerful/flexible command for the motion in the Kawasaki Language.
When you are trying to move reference to a coordinate system - like frame/base/user, then in Kawasaki you are restricted to:
DRAW......which is a motion and includes translation values aswell as orientation.
SHIFT......which is a calculation but only includes translation values and not orientation.Don't forget the POINT command variations too:
POINT/X test = master_loc; creates null location values for test - but copies X from master_loc to test
POINT/Y
POINT/Z
POINT/XYZ
POINT/OATWhere you can decompose the individual elements of a transform and copy them into another transform.
1、LMOVE tp1+TRANS(0,0,0,90,-30,-90) = positive rotation around the X axis by 30 degrees
2、LMOVE tp1+TRANS(0,0,0,0,-30,0) = negative rotation around the Y axis by 30 degrees
3、LMOVE tp1+TRANS(0,0,0,-30,0,0) = negative rotation around the Z axis by 30 degreesRemember the TRANS is relative to the taught transformation and NOT a specific coordinate system.
-
good
thanks -
Hi kawasaki,can help me to check following code error?
here tp1
LMOVE tp1+TRANS(0,0,0,90,-30,-90)
when executing,but robot can not rotation around the X axis by 30 degrees,why? -
1. What is the error.
2. What are the current Base values.
3. What are the current Tool (TCP) values.
4. What are the values for tp1. -
I ignored the tool coordinates,now It has been resolved。
code 1:
;it rotate 30 degree around the X axis with tool coordinate.
;it is not rotate 30 degree around X axis with base coordinate.
HERE start
POINT offset=TRANS(0,0,0,90,-30,-90)
LMOVE start+offset
BREAK
TWAIT 1
HERE start
POINT offset=TRANS(0,0,0,90,30,-90)
LMOVE start+offset
BREAK
TWAIT 1
code2:
;it is rotate 30 degree around X axis with base coordinate.
HERE start
POINT fx= SHIFT(start by 100,0,0)
POINT fy= SHIFT(start by 0,100,0)
POINT uc=frame(start,fx,fy,start)
POINT offset=TRANS(0,0,0,90,-30,-90)
LMOVE uc+offset-uc+start
BREAK
TWAIT 1
HERE start
POINT fx= SHIFT(start by 100,0,0)
POINT fy= SHIFT(start by 0,100,0)
POINT uc=frame(start,fx,fy,start)
POINT offset=TRANS(0,0,0,90,30,-90)
LMOVE uc+offset-uc+start
BREAK
TWAIT 1I use code2.
thanks -
Yes, so looking at your code 2 you rotate -30, then back +30.
TRANS command is very powerful, but does not give you the result on its own as it is applicable to the taught vectors.
- Therefore you have to apply the rotation around the Base(frame) X axis and not the taught vectors.QuoteLMOVE uc+offset-uc+start
Your compound instruction achieves this by rotating the Frame location by -30/+30 and applying the taught vectors to it..........
The compound instruction reads as:
- Return Frame location (XYZOAT) add a target angle for rotation (Frame location OAT change), subtract initial Frame values (results in target OAT change) and add taught location to it.
- Results in taught location vectors have been rotated around Frame vectors.