Error Handler / "If" statement help
I'll be the first to admit I don't have the required programming training to do this, which is why I'm seeking some help (still new to the company with having only the initial ABB programming class completed).
In short - we have a robot that has a gun attached (gas torch) and coats a part that is on an external axis, which rotates (spindle).
We got a torque collision error on the spindle, which faulted out the robot but kept the torch and coating material on, unbeknownst to the operator for an extended amount of time. This obviously ruined the part.
Speaking with ABB tech support - they offered some guidance on using an error handler within the routine and sent me some manuals. While this may prove helpful, I'm not really sure how to word it or go about setting things up, and where exactly to put it (assuming in the PROC Coat_Roll, listed below).
Would greatly appreciate any guidance with that. But can't I also just use an "IF" statement to say that if the spindle stops, shut off all inputs/outputs, similar to an E-stop situation?
Any information would be GREATLY appreciated!
Main routine and sub-routine listed:
In short - we have a robot that has a gun attached (gas torch) and coats a part that is on an external axis, which rotates (spindle).
We got a torque collision error on the spindle, which faulted out the robot but kept the torch and coating material on, unbeknownst to the operator for an extended amount of time. This obviously ruined the part.
Speaking with ABB tech support - they offered some guidance on using an error handler within the routine and sent me some manuals. While this may prove helpful, I'm not really sure how to word it or go about setting things up, and where exactly to put it (assuming in the PROC Coat_Roll, listed below).
Would greatly appreciate any guidance with that. But can't I also just use an "IF" statement to say that if the spindle stops, shut off all inputs/outputs, similar to an E-stop situation?
Any information would be GREATLY appreciated!
Main routine and sub-routine listed:
PROC main()
SetDO TPstop, high;
Running:=FALSE;
DoneCoating:=FALSE;
TPErase;
TPWrite "Walk In Mode Program Start";
ActUnit Spindle;
Init_IO;
Home_Walk_in;
Get_Data;
regPassCount:=NUM_PASSES;
TPWrite "Robot waiting Cycle Start";
TPWrite "Robot Cycling";
Coat_Roll;
TPWrite "Done";
Init_IO;
TPErase;
TPWrite "Walk In Mode Program Stop";
Home_Walk_in;
DeactUnit Spindle;
Stop;
ENDPROC
PROC Coat_Roll()
Calculations;
Start_Roll;
Powder_on;
SetDO doTorchCoolCtrl, high;
MoveL pStart, vTrav_Rapid, fine, tool2;
IF regTravSpeed=0 THEN
WaitTime NUM_PASSES;
GOTO D;
ENDIF
WHILE regPassCount>0 DO
IF regPassCount>0 THEN
LR:=1;
Running := TRUE;
IF PassTime > 500 THEN
FOR L FROM 1 TO n - 1 DO
L2:=L;
MoveL pMid{L}, v5\V:=TRAV_MMPS, z1, tool2;
ENDFOR
ENDIF
L2:=0;
MoveL pStop, v5\V:=TRAV_MMPS, z1, tool2;
Running := FALSE;
Pass_count;
ENDIF
IF regPassCount>0 THEN
LR:=0;
Running := TRUE;
IF PassTime > 500 THEN
FOR L FROM n-1 TO 1 STEP -1 DO
L2:=L;
MoveL pMid{L}, v5\V:=TRAV_MMPS, z1, tool2;
ENDFOR
ENDIF
L2:=0;
MoveL pStart, v5\V:=TRAV_MMPS, z1, tool2;
Running := FALSE;
Pass_count;
ENDIF
ENDWHILE
0
Comments
-
If the error happens in Coat_Roll() then you handle the error like this:
PROC Coat_Roll()
.
.
.
ERROR
IF(ERRNO= {torque collision error nr})
ShutDownOutputs;
ENDIF
ENDPROC0 -
An IF-statement would not be recognized, because the program stops after an unhandeled error.
0 -
Use a Stop Event Routine. This will run a routine when the robot program is Stopped. Could use QStop also. This is a Controller System parameter. The code the Event Routine to turn off the torch. See section 3.6 in the System Parameter manual0
-
I would probably create a virtual signal that the program controls, and cross connect that with a systeminput that is high when the task is executing and output it to the torch. That would give the result that the torch can only ever be on if the task is executing. Let me know if you need guidance.//Markus Näslund0
-
EricH said:If the error happens in Coat_Roll() then you handle the error like this:
PROC Coat_Roll()
.
.
.
ERROR
IF(ERRNO= {torque collision error nr})
ShutDownOutputs;
ENDIF
ENDPROC0 -
Also, is there a general fault statement that I can use to shut down everything regardless of what the error says?0
-
j_proulxFB said:Use a Stop Event Routine. This will run a routine when the robot program is Stopped. Could use QStop also. This is a Controller System parameter. The code the Event Routine to turn off the torch. See section 3.6 in the System Parameter manualI will look at this as well - thank you!
0 -
Eskatsaros said:
Does it matter where this goes in the routine, or just as long as its in there?
It needs to be at the end of the Routine for syntax reasons, it will only be executed, when the error happens.If you want to make a general error handling then I would suggest the other solutions here. Whether you use an event routine or a virtual signal doesn't matter, although an event routine is a lot more comfortable.
0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 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