Comparation robtargets
szily85
✭
Hi all!
I've got a task, where i have to define the actual position (CPos) or robtarget (CRobT) of the robot. This works, I can read them, but is it possible to compare two robtargets x,y or z possitions and based on the comparation should do a movement.
Like this:
PROC Compare()
posStud:=CPos(...
posLab:=CPos(...
IF posstud.x > Approach.x AND posstud.y> Approch.y THEN
!Move the robot up and turn (just en example)
ELSEIF
!Something else
ENDIF
So my question is, is it possible to compare robtargets x,y or z possitions?
If I try it says:
Reference to unknown component x
Or is it possible, to read from an existing robtarget the x, y and z positions?
Can you suggest something, how to do it?
I`d need this for an automatic HOME movement (I want the user just push a button then the rapid programming will solve the rest. Or is it other type of HOME movement?
Thanks
Regards Szily
0
Comments
-
I forgot to mention that Approach is robtarget!Regards Szily0
-
Try thisIF posstud.x > Approach.trans.x AND posstud.y> Approch.trans.y THENRobtarget has another structure of data types that you need to consider...Good luck!0 -
Thank you very much! It helped a lot.Regards Szily0
-
Hi all!Now can somebody tell me, how to stop the moving process of the robot. The task is: My robot moves along a path, and the user stops the robot manually (switch to manual mode) then pushes the Move home button. The robot after this action reads the actual position (this happens and it works well) and with an offset of 100mm moves toward and then HOME. BUT the problem is, that the robot still want`s to reach the next Robtarget (that was coming during the movement) and only after that, moves to the offset. Here is a part of my program:IF posStud.x < Approach.trans.x THENStopMove;TPWrite "Value is SMALLER then specified";TPReadFK reg1, "Move home?", stEmpty,stEmpty,stEmpty,"Yes", "No";IF reg1 = 4StartMove;VelSet 25,800;act_pos_home:=CRobT();home_moving_var:=Offs(act_pos_home,100,0,0);MoveL home_moving_var, v500, fine,......MoveJ Home, v500, fine, tStudWObj:=Wo_ArmeringsBunt;TPErase;ExitCycle;ELSEIF reg1 = 5 THENMoveJ act_pos_home, v500, fine,.....StartMove;How can I stop the movement of robot and just start it from the reading of actual position, offset it and move home? I tried with STOPMOVE, STOP, EXITCan help me somebody?Thank youRegards Szily0
-
After StopMove insert the instruction ClearPath; This will make the robot to "forget" it`s pathGood luck!!0 -
Thanks very much! It worked But than why couldn't find this instruction in the rapid instructiuon manual or other manual. I have at least 2-3 manuals and nowhere could find it.Anyway, thank you very much.GreatingsRegards Szily0
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)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings