Hello to the members..
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 p30, 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