Input interrupt example – Yaskawa SMC–4000 User Manual
Page 329
319
SMC–4000 User Manual
If the position error on the X axis exceeds that specified by the ER command, the #POSERR routine will
execute.
*Note The RE command is used to return from the #POSERR subroutine
*Note The #POSERR routine will continue to be executed until the position error is cleared (is
less than the ER limit).
Input Interrupt Example:
*Note Use the RI command to return from #ININT subroutine.
JP #LOOP;EN
Loop
#POSERR
Position Error Routine
V1=_TEX
Read Position Error
MG "EXCESS POSITION ERROR"
Print Message
MG "ERROR=",V1=
Print Error
RE
Return from Error
:XQ #LOOP
Execute Dummy Program
:JG 100000
Jog at High Speed
:BGX
Begin Motion
#A
Label
II1
Input Interrupt on 1
JG 30000,,,60000
Jog
BGXW
Begin Motion
#LOOP;JP#LOOP;EN
Loop
#ININT
Input Interrupt
ST;AM
Stop Motion
#TEST;JP #TEST, @IN[1]=0
Test for Input 1 still low
BGXW;RI
Begin motion and Return to Main Program
EN