AUTO_EXTERN I/O is required to operate the robot in EXT mode. In EXT mode, pendant controls for Acknowledge, Motors On, Program Start, Move Enable, etc, are disabled, and must instead be provided over I/O. These signals are required.
AUT mode is a sort of "standalone" automatic mode -- it allows the robot to run in automatic, but uses the pendant buttons (manual motors, start, program selection, etc), and ignores the AUTO_EXTERN signals (aside from Move Enable, which must be set to $IN[1025], the "always true" system input).
The PGNO signals for CELL.SRC are not required at the system level, but are provided along with CELL to make an easy, common template for selecting programs in EXT mode. It is possible to ignore CELL and the PGNO signals entirely and create your own alternative, but most programmers don't bother -- CELL is convenient and well-tested, so why not use it?
Thanks for detailed explanation, but the problem is that I haven't understood yet how to send these PGNO signals. What kind of device is sending PGNO signals to kuka controller? Is that a remote PC either external PLC-master?
As I guess, PLC-master sends bytes with programs numbers through SEND/RECIEVE blocks in s7/TiaPortal, for example. Then, we configure inputs/outputs in work visual. After all, we need to write conditions in CELL.src for each CASE.
For example, which condition should be followed to start CASE 2? Should I firstly set PGNO as (for example) a $signal of 16 bits (to transfer from PLC)? Could you show me an example of simple cell.src template?
&ACCESS RVP
&REL 1
&COMMENT HANDLER on external automatic
DEF CELL ( )
EXT program_sort_1 ( )
EXT program_sort_2 ( )
;FOLD INIT
DECL CHAR DMY[3]
DMY[]="---"
;ENDFOLD (INIT)
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD CHECK HOME
$H_POS=XHOME
IF CHECK_HOME==TRUE THEN
P00 (#CHK_HOME,#PGNO_GET,DMY[],0 ) ;Testing Home-Position
ENDIF
;ENDFOLD (CHECK HOME)
;FOLD PTP HOME Vel= 100 % DEFAULT;%{PE}%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:HOME, 3:, 5:100, 7:DEFAULT
$H_POS=XHOME
PDAT_ACT=PDEFAULT
BAS (#PTP_DAT )
FDAT_ACT=FHOME
BAS (#FRAMES )
BAS (#VEL_PTP,100 )
PTP XHOME
;ENDFOLD
;FOLD AUTOEXT INI
P00 (#INIT_EXT,#PGNO_GET,DMY[],0 ) ; Initialize extern mode
;ENDFOLD (AUTOEXT INI)
LOOP
P00 (#EXT_PGNO,#PGNO_GET,DMY[],0 )
SWITCH PGNO ; Select with Programnumber
CASE 1
P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
program_sort_1 ( ) ; Call User-Program
CASE 2
P00 (#EXT_PGNO,#PGNO_ACKN,DMY[],0 ) ; Reset Progr.No.-Request
program_sort_2 ( )
DEFAULT
P00 (#EXT_PGNO,#PGNO_FAULT,DMY[],0 )
ENDSWITCH
ENDLOOP
END
I would be unlimitedly happy to get some good clear manual about that.