N230 x10
N240 y5
N250 execute(_SB)
N260 cprot(2,2,0,0,0)
N270 cprot(4,1,0,0,0)
N280 nprot(3,2,0,0,0)
N290 g25 XX=–YY=–
N300 g26 xx= 20 yy= 21
N310 _STARTPOS[0] = 0.
N320 _STARTPOS[1] = 0.
N330 _STARTPOS[2] = 0.
N340 _MOVDIST[0] = 35.
N350 _MOVDIST[1] = 20.
N360 _MOVDIST[2] = 0.
N370 _DLIMIT[0] = 0.
N380 _DLIMIT[1] = 0.
N390 _DLIMIT[2] = 0.
N400 _DLIMIT[3] = 0.
N410 _DLIMIT[4] = 0.
; various function calls
N420 _STATUS = calcposi(_STARTPOS,_MOVDIST,_DLIMIT,_MAXDIST)
N430 _STATUS = calcposi(_STARTPOS,_MOVDIST,_DLIMIT,_MAXDIST,,3)
N440 _STATUS = calcposi(_STARTPOS,_MOVDIST,_DLIMIT,_MAXDIST,,1)
N450 _STARTPOS[0] = 5.
N460 _STARTPOS[1] = 17.
N470 _STARTPOS[2] = 0.
N480 _MOVDIST[0] = 0.
N490 _MOVDIST[1] =–.
N500 _MOVDIST[2] = 0.
; various function calls
N510 _STATUS = calcposi(_STARTPOS,_MOVDIST,_DLIMIT,_MAXDIST,,14)
N520 _STATUS = calcposi(_STARTPOS,_MOVDIST,_DLIMIT,_MAXDIST,,6)
N530 _DLIMIT[1] = 2.
N540 _STATUS = calcposi(_STARTPOS,_MOVDIST,_DLIMIT,_MAXDIST,,6)
N550 _STARTPOS[0] = 27.
N560 _STARTPOS[1] = 17.1
N570 _STARTPOS[2] = 0.
N580 _MOVDIST[0] =–.
N590 _MOVDIST[1] = 0.
N600 _MOVDIST[2] = 0.
N610 _DLIMIT[3] = 2.
N620 _STATUS = calcposi(_STARTPOS,_MOVDIST,_DLIMIT,_MAXDIST,,12)
N630 _STARTPOS[0] = 0.
N640 _STARTPOS[1] = 0.
N650 _STARTPOS[2] = 0.
N660 _MOVDIST[0] = 0.
N670 _MOVDIST[1] = 30.
N680 _MOVDIST[2] = 0.
N690 trans x10
N700 arot z45
N710 _STATUS = calcposi(_STARTPOS,_MOVDIST,_DLIMIT,_MAXDIST)
N720 M30
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
4.3 Checking for protection zone violation, working area limitation and software limits
;activate/deactivate
;protection zones
;define working area limitations
;other starting point
;other destination
Protection zones
4-11