Program displacement

Rookie
✭✭
Hi All,
I have a problem making a program displacement. Let me try to explain:
I have a robtarget with a rot of [0,-1,0,0]. On a main computer a displacement is made of -90 degrees on Y-ax this position. with a posemult this rot is changed. So far so good; if a make the displacement -80 everything goes well; when the displacemend <-83 it all goes wrong. The robot goes to a different position. 

Here is a part of the code:
! - Get XYZ translations opposite to the current position
Xpp:=pPositions{OffsetPosition}.trans.x;
Ypp:=pPositions{OffsetPosition}.trans.y;
Zpp:=pPositions{OffsetPosition}.trans.z;
! - Get the wanted rotation opposite to the current rotation
Point.rot:=pPositions{OffsetPosition}.rot;
! - Get the current rotation of the used robtarget
BasePos.rot:=ORIENTZYX(EulerZYX(,basePosition.rot),EulerZYX(Y,basePosition.rot),EulerZYX(X,basePosition.rot));
! -Calculate the final rotation
FinalPos:=PoseMult(BasePos,Point);
! - Build the final robtarget
Position:=Offs(basePosition,Xpp,Ypp,Zpp);
Position.rot:=FinalPos.rot;
Please let me know your thoughts
0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 337 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 831 RAPID Programming
- 14 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings