Hallo zusammen,
habe Probleme mit einer Greiferstatus prüfung.
Fehler: Maximale anzahl versuche überschritten (genaue Meldung weis ich jetzt nicht).
Routine:
PROC rGrp2Check(
\switch GRP_GET
|switch GRP_DRP)
!
! get part with gripper
IF Present(GRP_GET) THEN
IF DOutput(Q_GRP2_OPN)=0 THEN
RAISE 1;
ELSE
IF I_GRP2_PCK=1 THEN
RAISE 3;
ELSE
RETURN;
ENDIF
ENDIF
ENDIF
!
! drop part with gripper
IF Present(GRP_DRP) THEN
IF DOutput(Q_GRP2_OPN)=1 THEN
RAISE 2;
ELSE
IF I_GRP2_PCK=0 THEN
RAISE 4;
ELSE
RETURN;
ENDIF
ENDIF
ENDIF
!
ERROR
TEST ERRNO
CASE 1:
StopMove;
TPErase;
SetGO qErrNr,ERR_GRP2;
TPReadFK nTPSel,"Fehler Greifer2 sollte offen sein",stEmpty,stEmpty,stEmpty,stEmpty,"OK";
SetGO qErrNr,0;
StartMove;
RETRY;
!
CASE 2:
StopMove;
TPErase;
SetGO qErrNr,ERR_GRP2;
TPReadFK nTPSel,"Fehler Greifer2 sollte geschlossen sein",stEmpty,stEmpty,stEmpty,stEmpty,"OK";
SetGO qErrNr,0;
StartMove;
RETRY;
!
CASE 3:
StopMove;
TPErase;
SetGO qErrNr,ERR_GRP2;
TPReadFK nTPSel,"Fehler Greifer2 sollte leer sein",stEmpty,stEmpty,stEmpty,stEmpty,"OK";
SetGO qErrNr,0;
StartMove;
RETRY;
!
CASE 4:
StopMove;
TPErase;
SetGO qErrNr,ERR_GRP2;
TPReadFK nTPSel,"Fehler Greifer2 sollte belegt sein",stEmpty,stEmpty,stEmpty,stEmpty,"OK";
SetGO qErrNr,0;
StartMove;
RETRY;
!
DEFAULT:
StopMove;
TPErase;
TPReadFK nTPSel,"Unbekannte Fehlerursache bei Greiferstatus Greifer2",stEmpty,stEmpty,stEmpty,stEmpty,"OK";
StartMove;
RETRY;
ENDTEST
ENDPROC