Get current robot location
How do I verify the robot's current location? I am trying to use this but it just falls through.
obtarget Loc2
obtarget Loc3
obtarget Loc4
obtarget Loc5
obtarget Loc6
obtarget Loc7
obtarget Loc8)
FUNC bool CheckLocation(
num DistanceMM,
robtarget Location,
obtarget Loc2
obtarget Loc3
obtarget Loc4
obtarget Loc5
obtarget Loc6
obtarget Loc7
obtarget Loc8)
VAR robtarget CurRobT2;
VAR num nDistance:=0;
!
! get the current location
CurRobT2:=CRobT();
!
! check location distance and axis configuration
IF RobtToRobtDist(Location,CurRobT2)<DistanceMM AND RobtToRobtConf(Location,CurRobT2Approx) THEN
RETURN TRUE;
ENDIF
!
IF Present(Loc2) THEN
! check alternate location 2
IF RobtToRobtDist(Loc2,CurRobT2)<DistanceMM AND RobtToRobtConf(Loc2,CurRobT2Approx) THEN
RETURN TRUE;
ENDIF
ENDIF
!
IF Present(Loc3) THEN
! check alternate location 3
IF RobtToRobtDist(Loc3,CurRobT2)<DistanceMM AND RobtToRobtConf(Loc3,CurRobT2Approx) THEN
RETURN TRUE;
ENDIF
ENDIF
.....
and so on...
The pointer passes by the IF Present(Loc) command even though its in the top of the function. Any help is appreciated.
Thanks
0
Comments
-
Be aware of that the robot needs to stand still when you read the position with CRobTPer Svensson
Robotics and Vision Specialist
Consat Engineering0 -
Can you use ABB worldzone option for that?. You can use worldzone to activate a digital output when ever robot reaches predefined space.
0 -
Moved to RobotWare forum.
Henrik Berlin
ABB0 -
THis function requires a passed in distance and a passed in robottarget.The function then appears to back check the current position verus the passed in robotarget to see if the robot is within whatever distnace you passed in. If it is within the distance then it will return a TRUE statement if it is not then it will return a false. That is just an assumption since you didnt post all of the code.Seeing the calling routine that calls this function would also help as well.0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 801 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings