I get 62 errors and I have no idea why. Many are "type actual/formal parameter incompatible" seems to effect err=ST_ETHERNET.
&ACCESS RVP
&REL 3
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM EDITMASK = *
DEF parametricRasterRsiV5( )
DECL POS start_pos, next_pos
DECL AXIS PATH_HOME
DECL INT II
DECL REAL maxY, maxX, maxZ, Xstep, Ystep, Zstep
DECL BOOL dirX, dirY
;FOLD INI
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD SPOTTECH INI
USERSPOT(#INIT)
;ENDFOLD (SPOTTECH INI)
;FOLD GRIPPERTECH INI
USER_GRP(0,DUMMY,DUMMY,GDEFAULT)
;ENDFOLD (GRIPPERTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
HALT
; The current position will be used as SAK movement!
PTP $POS_ACT
; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
; Create RSI Object ST_Ethernet, read object configuration .../INIT/ERXConfig.xml
err = ST_ETHERNET(hEthernet,0,"RSIethernet.xml")
IF (err <> #RSIOK) THEN
HALT
ENDIF
; err = ST_SETPARAM(hEthernet,eERXmaxLatePackages,1) ; after "value" to late packages the robot stopps
; err = ST_SETPARAM(hEthernet,eERXmaxLateInPercent,10) ; RSIWARNING if the limit reached
; err = ST_SETPARAM(hEthernet,eERXmaxFieldOfView,1000) ;reset every 'value' statistics.
; err = ST_SETPARAM(hEthernet, eERXFastCycle, 1) ; FALSE: Time to answer 11ms / TRUE: Fast cycle: answer <2ms necessary!
; err = ST_SETPARAM(hEthernet, eERXerrorFlag, 1) ; $FLAG[1] will be set in case off errors
;FOLD RSI-Objects to link in ST_Ethernet
; read $IN[1-16]
err = ST_DIGIN(hDin,0,1,2,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hDin,1,hEthernet,1)
IF (err <> #RSIOK) THEN
HALT
ENDIF
; read $OUT[1-3]
err = ST_DIGOUT(hDout1,0,1,0,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_DIGOUT(hDout2,0,2,0,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_DIGOUT(hDout3,0,3,0,0)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hDout1,1,hEthernet,2)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hDout2,1,hEthernet,3)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hDout3,1,hEthernet,4)
IF (err <> #RSIOK) THEN
HALT
ENDIF
; make sine signal
UNIT_RSI = 3601
err = ST_SOURCE(hsource,0,UNIT_RSI)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_SETPARAM(hsource,1,1)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_SETPARAM(hsource,3,50)
IF (err <> #RSIOK) THEN
HALT
ENDIF
err = ST_NEWLINK(hsource,1,hEthernet,5)
IF (err <> #RSIOK) THEN
HALT
ENDIF
;ENDFOLD
IF (err <> #RSIOK) THEN
HALT
ENDIF
;**************************************
;*** DEFINITION OF INPUT PARAMETERS ***
;**************************************
;*** DEFINE VELOCITY, HOME POSITION, BASE AND TOOL FOR PROGRAM HERE ***
$VEL.CP = 0.04 ; VELOCITY
PATH_HOME = {AXIS: A1 0,A2 -60,A3 120,A4 0,A5 30,A6 0} ; HOME POSITION
$base = BASE_DATA[0] ; BASE
$tool = TOOL_DATA[0] ; TOOL
;*** DEFINE START/END POSITIONS ***
maxY = 1
maxX = 750
maxZ = 800
Xstep = 10
Ystep = 1038
Zstep = 50
start_pos = {POS: X 1485,Y -1038,Z 210,A -180,B 0,C 0}
;****************************
;*** INITIALIZE TOOL-PATH ***
;****************************
FOR II=1 TO 6
$VEL_AXIS[II]=20
$ACC_AXIS[II]=100
ENDFOR
; To set 'Tool On Robot' Mode
$IPO_MODE = #BASE
; Set smoothing value
$APO.CDIS = 10
; Set $ADVANCE value (number of points read in advance)
$ADVANCE = 0
PTP PATH_HOME ; Go to HOME position
LIN start_pos
dirX = false
dirY = false
next_pos=start_pos
LIN start_pos
WAIT SEC 1
LOOP
IF dirX == false THEN
LOOP
IF dirY == false THEN
LOOP
IF next_pos.y < start_pos.y + maxY THEN
next_pos.y = next_pos.y + Ystep
LIN next_pos
ELSE
EXIT
ENDIF
ENDLOOP
dirY = true
ELSE
LOOP
IF next_pos.y > start_pos.y THEN
next_pos.y = next_pos.y - Ystep
LIN next_pos
ELSE
EXIT
ENDIF
ENDLOOP
dirY = false
ENDIF
IF next_pos.x < start_pos.x + maxX THEN
next_pos.x = next_pos.x + Xstep
LIN next_pos
ELSE
EXIT
ENDIF
ENDLOOP
dirX = true
ELSE
LOOP
IF dirY == false THEN
LOOP
IF next_pos.y < start_pos.y + maxY THEN
next_pos.y = next_pos.y + Ystep
LIN next_pos
ELSE
EXIT
ENDIF
ENDLOOP
dirY = true
ELSE
LOOP
IF next_pos.y > start_pos.y THEN
next_pos.y = next_pos.y - Ystep
LIN next_pos
ELSE
EXIT
ENDIF
ENDLOOP
dirY = false
ENDIF
IF next_pos.x > start_pos.x THEN
next_pos.x = next_pos.x - Xstep
LIN next_pos
ELSE
EXIT
ENDIF
ENDLOOP
dirX = false
ENDIF
IF next_pos.z < start_pos.z + maxZ THEN
next_pos.z = next_pos.z + Zstep
LIN next_pos
ELSE
EXIT
ENDIF
ENDLOOP;
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**=*=*=*=*=*=*=*=*=*=*
ST_SKIPSENS() ;Hold on - until RSI-Break reason occur
; *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=**=*=*=*=*=*=*=*=*=*=*
PTP PATH_HOME
END
Display More