Example program for Automatic External mode without PLC

Example program for Automatic External mode without PLC

nitinan

จังหวัด :
วันที่สมัคร : 10 Jun 2020
กระทู้ : 1
ข้อคิดเห็น : 0
Example program for Automatic External mode without PLC


&ACCESS RVO
&REL 19
&PARAM EDITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\ExpertSubmit
DEF auto_ext( )
LOOP
IF $MODE_OP==#EX THEN
IF E_START THEN ; mit dem Flag E_Start wird die Zustandsmaschine gestartet
EXT_RUN()
ELSE
EXT_STOP()
ENDIF
ENDIF
; Handverfahren
IF $MODE_OP==#T1 THEN
ROB_STOP_RELEASE()
ENDIF
E_START_ALT = E_START ; FLANKE erkennen
IF E_RESET AND ($MODE_OP==#EX) THEN
EXT_RESET()
ENDIF
ENDLOOP
END

DEF EXT_RUN()
bool ret
ROB_STOP_RELEASE()
A_MOVE_ENABLE=TRUE
IF $PRO_STATE1==#P_ACTIVE THEN ; Programm läuft ereits
RETURN
ENDIF
IF $USER_SAF AND $ALARM_STOP AND ($MODE_OP==#EX) THEN
IF NOT $PERI_RDY AND NOT A_DRIVES_ON THEN ; ANTRIEBE EINSCHALTEN
PULSE(A_DRIVES_ON,TRUE,0.2)
ELSE
IF $STOPMESS AND NOT A_CONF_MESS THEN ; FEHLER QUITTIEREN
PULSE(A_CONF_MESS,TRUE,0.2)
ELSE
IF NOT $PRO_ACT AND NOT A_EXT_START AND NOT $STOPMESS THEN ; EXTERN START
PULSE(A_EXT_START,TRUE,0.2)
ENDIF
ENDIF
ENDIF
IF $STOPMESS AND NOT A_CONF_MESS THEN ; FEHLER QUITTIEREN
PULSE(A_CONF_MESS,TRUE,0.1)
ENDIF
ENDIF
END

DEF EXT_STOP()
bool ret
ret = Rob_stop(#RAMP_DOWN) ; PLC_ROB_STOP()
END

DEF EXT_RESET()

DECL STATE_T STAT
DECL MODUS_T MODE
IF ($PRO_STATE1 <> #P_RESET) AND ($PRO_STATE1 <>#P_FREE) THEN
CWRITE($CMD,STAT,MODE,"reset 1")
ENDIF

END
วันที่โพสต์ : 10 Oct 2022 11:23:46 IP Address : 58.136.157.x
สร้างเว็บไซต์สำเร็จรูปฟรี ร้านค้าออนไลน์