Robot has been moved
Hello,
I have a small robot setup with an IRB140.
I would like to be able to check if the robot is in the home position, in the rapid code.
If the robot is not in the home pos, the robot should reset, and run to the home pos.
The problem is that sometimes the operator for some reason will go in to the robot, push the release brake button and move the robot manually. We have tried telling them that they shouldn't do this, but they keep doing it .......
I have attached the code I use right now. it works actually really great.
But if they move the robot after the this program have been run once, the "pndo4_Resat" will be 1, and therefore it wont run the routine again.
BTW i'm pretty new to programming, and if this way of doing it, is totally wrong, please let me know
Thanks in advanced.
Martin Greve
I have a small robot setup with an IRB140.
I would like to be able to check if the robot is in the home position, in the rapid code.
If the robot is not in the home pos, the robot should reset, and run to the home pos.
The problem is that sometimes the operator for some reason will go in to the robot, push the release brake button and move the robot manually. We have tried telling them that they shouldn't do this, but they keep doing it .......
I have attached the code I use right now. it works actually really great.
But if they move the robot after the this program have been run once, the "pndo4_Resat" will be 1, and therefore it wont run the routine again.
BTW i'm pretty new to programming, and if this way of doing it, is totally wrong, please let me know
Thanks in advanced.
Martin Greve
IF pndo4_Resat=0 THEN
SR7_ResetRoutine;
ENDIF
PROC SR7_ResetRoutine()
pCurrentRobotPos_01:=CJointT();
MotionSup\On\TuneValue:=250;
pRobotResetTarget:=CRobT(\Tool:=Gripper\WObj:=wobj0);
IF pCurrentRobotPos_01.robax.rax_5<-10 THEN
pRobotResetTarget.trans.x:=550;
MoveL pRobotResetTarget,vVerySlow,fine,Gripper\WObj:=wobj0;
MoveJ p00Home,vVerySlow,fine,Gripper\WObj:=Conveyor;
IF nGripperFull=1 THEN
SR6_Reset_Dropoff;
ENDIF
nGripperFull:=0;
SetDO pndo4_Resat,1;
ELSE
pRobotResetTarget.trans.z:=300;
MoveL pRobotResetTarget,vVerySlow,fine,Gripper\WObj:=wobj0;
MoveJ p00Home,vVerySlow,fine,Gripper\WObj:=Conveyor;
IF nGripperFull=1 THEN
SR6_Reset_Dropoff;
ENDIF
nGripperFull:=0;
SetDO pndo4_Resat,1;
ENDIF
MotionSup\On\TuneValue:=150;
Stop;
ENDPROC
Martin Greve
Denmark
Denmark
0
Comments
-
Create a Event Routine which is linked to a world zone (specifically HomeJointWZ).
Try this steps in the document.
0 -
Unfortunately the robot is not equipped with the World Zone option.Martin Greve
Denmark0 -
Can you supply your system type details?
Have you tried adding the option to your system?0 -
I'm also new in programming and dont know if its clever, but you could compare current x,y,z coordinates with excepted coordinates in home position ? or compare joint angles with a defined tolerance
0 -
<code> Abs(tempJoints.rax_2-homePos.rax_2)>10 OR ...<br> !reset robot and move home<br> Else !already in home position<br> ENDIF<br>ENDPROC<br>
CheckHomePos;<br><br>PROC CheckHomePos()<br> var jointtarget tempJoints;<br> tempJoints:=CJointT();<br> IF Abs(tempJoints.rax_1-homePos.rax_1)>10 OR
Maybe something like this? please let me know if its a bad idea
Post edited by Paba on0
Categories
- All Categories
- 5.5K RobotStudio
- 396 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