Get robot position while moving
Luks
✭
Is there any way to get the robot position while it is moving? I'm programming a path with a start point and a final point but i need to get a position feedback for the whole path.
Thanks for your help!
Thanks for your help!
0
Comments
-
You can use multi tasking option. Use your second task to monitor TCP position using CRobT.0
-
Can it be Done similiar to the following Code?IF not bShutDown and bIsSettled THEN
;Monitor the current position and calculate radius and angle for
CONTINUE
pStartPoint=$POS_ACT
;Define Zero
pZeroPoint={X 0,Y 0,Z 0,A 0,B 0,C 0,S 0,T 0}
;equalize the Z component
pZeroPoint.Z=pStartPoint.Z
;Now calculate the starting radius
nStartRadius=distance(pStartPoint,pZeroPoint)
nX=pStartPoint.X
nY=pStartPoint.Y
;Calculate the angle
nHypot=SQRT((nX*nX)+(nY*nY))
IF (nHypot<>0) THEN
nTemp=(nX/nHypot)
ELSE
nTemp=1
ENDIF
nAngle1=ACOS(nTemp)
IF (nY<0) THEN
nAngle1=-nAngle1
ENDIF
;Get current Robot Joint Data
CONTINUE
CurrJointData=$AXIS_ACT
;Check Minimum Values of All Joints
;Check J1 Position MIN
IF nCurrJointMin[1] > CurrJointData.A1 THEN
nCurrJointMin[1]=nCurrJointMin[1]
ELSE
nCurrJointMin[1]=CurrJointData.A1
ENDIF
;Check J1 Position MAX
IF nCurrJointMax[1] > CurrJointData.A1 THEN
nCurrJointMax[1]=nCurrJointMax[1]
ELSE
nCurrJointMax[1]=CurrJointData.A1
ENDIF
;Check J2 Position MIN
IF nCurrJointMin[2] > CurrJointData.A2 THEN
nCurrJointMin[2]=nCurrJointMin[2]
ELSE
nCurrJointMin[2]=CurrJointData.A2
ENDIF
;Check J2 Position MAX
IF nCurrJointMax[2] > CurrJointData.A2 THEN
nCurrJointMax[2]=nCurrJointMax[1]
ELSE
nCurrJointMax[2]=CurrJointData.A2
ENDIF
;Check J3 Position MIN
IF nCurrJointMin[3] > CurrJointData.A3 THEN
nCurrJointMin[3]=nCurrJointMin[3]
ELSE
nCurrJointMin[3]=CurrJointData.A3
ENDIF
;Check J3 Position MAX
IF nCurrJointMax[3] > CurrJointData.A3 THEN
nCurrJointMax[3]=nCurrJointMax[3]
ELSE
nCurrJointMax[3]=CurrJointData.A3
ENDIF
;Check J4 Position MIN
IF nCurrJointMin[4] > CurrJointData.A4 THEN
nCurrJointMin[4]=nCurrJointMin[4]
ELSE
nCurrJointMin[4]=CurrJointData.A4
ENDIF
;Check J4 Position MAX
IF nCurrJointMax[4] > CurrJointData.A4 THEN
nCurrJointMax[4]=nCurrJointMax[4]
ELSE
nCurrJointMin[4]=CurrJointData.A4
ENDIF
;Check J5 Position MIN
IF nCurrJointMin[5] > CurrJointData.A5 THEN
nCurrJointMin[5]=nCurrJointMin[5]
ELSE
nCurrJointMin[5]=CurrJointData.A5
ENDIF
;Check J5 Position MAX
IF nCurrJointMax[5] > CurrJointData.A5 THEN
nCurrJointMax[5]=nCurrJointMax[5]
ELSE
nCurrJointMax[5]=CurrJointData.A5
ENDIF
;Check J6 Position MIN
IF nCurrJointMin[6] > CurrJointData.A6 THEN
nCurrJointMin[6]=nCurrJointMin[6]
ELSE
nCurrJointMin[6]=CurrJointData.A6
ENDIF
;Check J6 Position MAX
IF nCurrJointMax[6] > CurrJointData.A6 THEN
nCurrJointMax[6]=nCurrJointMax[6]
ELSE
nCurrJointMin[6]=CurrJointData.A6
ENDIF
ENDIF
RETURN0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings