Examples and tips
PROGRAMMING MANUAL
319
R
e
vi
si
o
n
1
.0
MECHATROLINK(0,20,$43) 'SJDE-02ANA-OY
REGIST(-1)
VR(system01)=0
i=0
res=0
WHILE TABLE(i)<>-1
IF NOT DRIVE_READ(TABLE(i),TABLE(i+3),system01) THEN
SET_BIT(0,diag02)
ELSE
IF TABLE(i+2)=$FFFFFF THEN
IF VR(system01)<>TABLE(i+1) THEN
IF NOT DRIVE_WRITE(TABLE(i),TABLE(i+3),TABLE(i+1),1) THEN
SET_BIT(1,diag02)
ELSE
res=1
ENDIF
ENDIF
ELSE 'Parameter set using Mask
IF (VR(system01) AND NOT TABLE(i+2))<>TABLE(i+1) THEN
VR(system01)=(VR(system01) AND TABLE(i+2)) OR TABLE(i+1)
IF NOT DRIVE_WRITE(TABLE(i),TABLE(i+3),VR(system01),1) THEN
SET_BIT(1,diag02)
ELSE
res=1
ENDIF
ENDIF
ENDIF
ENDIF
i=i+4
WEND
'Reset drive if necessary
IF res=1 THEN
IF NOT DRIVE_RESET THEN SET_BIT(0,diag02)
ENDIF
BASE(3)
'Parameter data param_n/param_v/mask/size