Interrupt Issue
i am working on a drilling spindle which can sense the object using load indicator, a touch will generate current rise, which is used as interrupt signal in the rapid code. the point of touch will be the starting point of the moveL in trap routine.
below is the rapid code for the drill:
VAR intnum intload
PROC main ()
IDelete intload;
Connect intload WITH Drilling;
ISignalDI , Control_Drill, 1,intload;
Set Spindle_on; “Bit to power up Spindle”
MoveJ p10, v100, Fine, Tool1;
MoveL p20, v100, Fine, Tool1;
Set Enable_On; “Spindle Start Rotating at reference speed”
Wait Time 2; “Time to reach desired rpm and get smooth in terms of current”
MoveL OFFs (P20, 0, 0, 50), V10, Fine, Tool1;
! Interrupt should occur here as the drill bit touches the surface before reaching 50mm Z-Axis and DI “Control_Drill” sets high. Robot should go to P40.
Reset Enable_On;
MoveL p40, V10, Fine, Tool1;
Reset Spindle_on;
End PROC
TRAP Drilling
VAR Robotarget p40
StopMove/ Quick;
P40:= CRobT ( \Tool := Tool1 \ WObj := WObj0);
MoveL OFFs (p40, 0, 0, 30), v10, Fine, Tool1;
ClearPath;
StartMove;
ExitCycle;
End TRAP
Comments
-
my problem is, in auto-mode robot directly goes to TRAP Routine at P40, and got stuck there, even if the DI is not set high.
I also used "SearchL" command instead of "MoveL". the robot goes to p40 and got stuck there after Di is set high.
i looked for "StorePath" and "RestorePath" commands in my teachpendant commands list but could not found.0 -
Have you tried using a waitdi in the main routine where your comment about the interrupt is.
The stopmove/quick and the rest of your drilling code can go directly after the waitdi in the main routine0 -
i tried using Wit DI, the problem was, Robot first finish the 50 mm Offset movement in Z-axis then look for the waitDI. And i need interrupt before the 50mm offset, as surface will be detected by the drill bit a variable value, which can be at 30mm or 40mm or 25mm.
0 -
If you change the zone to z0 instead of fine the logic will continue on to the WaitDI and then to the stopmove once the Input is made.0
-
Sir, I tried "WaitDI" command using zonedate "Z0", but the problem still occurs. the robot first complete the 50mm offset move then go for the waitdi command. I also used SearchL command the same problem remains. Robot stucks at "MoveL" Command right after the "StoMove/Quick" command.
I studied an example in the manual, there is a need of "Storepath & Restorepath" command whenever the "StopMove" command is used. I look for the commands in the "Teachpendant" motion & adv, i only found "Clearpath" command. Could this be the reason0 -
The searchL command will stop the robot so you do not need the StopMoveQuick.
Example from manual:- SearchL \Stop, di2, sp, p10, v100, probe;
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