Interupt (TRAP) and motion
AlexK
✭✭
Hi I'm having a behaviour that I consider "weird" might be perfectly logical but I don't see it at this moment. So some help in explaining this would be very helpfull.
Here's the code:
[code]
MODULE StopTest
VAR intnum tra;
VAR errnum ERR_RESUME:=-1;
VAR errstr ErrMed:= "";
TRAP trap_move
VAR robtarget pPosition;
BookErrNo ERR_RESUME;
ISleep tra; StopMove;
!StorePath;
ClearPath;
StartMove;
pNoll.rot:=OrientZYX(45,0,-180);
GetSysData curtoolvalue;
GetSysData curwobjvalue;
pPosition := CRobT(Tool:=curtoolvalue, WObj:=curwobjvalue);
nVridning:=45;
FOR i FROM EulerZYX(Z, pPosition.rot) TO nVridning STEP NegPos(1,EulerZYX(Z, pPosition.rot), nVridning) DO
pPosition.rot := OrientZYX(i,0,-180);
pTemp.rot := OrientZYX(i,0,-180);
MoveL pPosition, v1000, z0,curtoolvalueWObj:=curwobjvalue;
ENDFOR
!MoveL Offs(pNoll,300,2000,300), v100, fine, to12mmFrA?sWObj:=woBlad;
IWatch tra;
!RestoPath;
!StartMove;
ENDTRAP
PROC interrupt()
CONNECT tra WITH trap_move;
ISignalDI viInterupt1, 1, tra;
SM;
ENDPROC
PROC SB()
Return;
ENDPROC
PROC SM()
MoveJ Offs(pNoll,300,0,300), v1000, z100, to12mmFrA?sWObj:=woBlad; pTemp:=pNoll; pTemp.trans.x := 300;
pTemp.trans.Y := 2000;
MoveL pTemp, v100, fine, to12mmFrA?sWObj:=woBlad;
pTemp.rot:=OrientZYX(90,0,-180);
ENDPROC
ENDMODULE
[/code]
NegPos function returns either a negative number or positive depending on which of the two values that are bigger then the other. The value that's returned is the first parameter (in this case "1")
What this is ment to do:
This is a test to try and make an interupt that handles orientation based on different world zones, while executing the normal move instructions the interupt will stop the movment and initiate an orientation change (the tool will be turned around it's z axis) and then initiate the last known move instruction.
Now I can see why it would not start:
"MoveL pTemp, v100, fine, to12mmFrA?sWObj:=woBlad;" (this is where the interupt is also started, while this is executed so it's somewhere on the path when the orientation is started)
I can understand if it would toss me an error and refuse to start execution at this instruction, but it does start the execution of the move instruction, doesn't toss me an error and it just sits there for all eternity trying to execute the move instruction.
I do see a flaw as the path has been cleared and it is no longer vaild either(as we've rotated around the z axis), so there is no path to follow, but I don't recive any error.
Even if i put the program pointer somewhere else and then back on this move instruction it does not go to it's final destination, it changes it's orientation to something that's never been apart of that position but it doesn't move to it's final destination thats 100's of mm away. I tried deleting and disable the trap and then execute the instruction but it's still the same, it decides it's in position even if it's not. This was done with the "FWD" button doing a one step execution.
Whenever I set the program pointer to the move instruction and then press play it starts to move to the correct position, the FWD no longer works after this on the specific move instruction but works on other move instructions.
This was executed on robotstudio, I don't have a real robot to test this on until several weeks from now and then it's a bit too late.
Thank you for any assistance you may be able to give me!
Best regards
Alexander Källberg
Alexander Källberg
0
Comments
-
AlexK2010-06-15 14:22:08Best regards
Alexander Källberg0 -
Moved to RobotWare forum.Henrik Berlin
ABB0 -
I don't have an answer to your problem. But I imagine the controller might run into difficulties with the confdata when the robtarget coordinates are modified. Are you using confdata or are you running with ConfL/Off, ConfJ/Off? A second thing to try would be to change the MoveL to MoveJ since the robot might have problems doing a linear move to the position. On the other hand, if any of these things caused the problem, you should have got an error message.WARNING: Using MoveJ might cause the robot to take an unexpected route to the target (unexpected from a user point of view), which might cause reorientation and large movements. The motion is of course controlled and predicatable and repeatable but might be unexpected from a user point of view. Also, ConfJ/Off, ConfL/Off hands over some control to the robot controller to find a working motion. Try this in RobotStudio first, and if done on the physical robot, do it in low speed first.Henrik Berlin2010-06-22 07:58:12Henrik Berlin
ABB0 -
dear fellow programmers,
I have a "main module", and have written a separate program module in which i only "connect" to a trap routine written in the same module (latter one),
dont have multitasking, i wanted to ask will my interrupt execute (from the other prog module while main in Main Module is executing ??
also i wanted to know what all can be written in other modules (eg *.sys or *.prg, other than main module) except for declarations.
thanks in advance.
best regards
Do not fear to be eccentric in opinion, for every opinion now accepted was once eccentric..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)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings