KEYENCE Visual KV Series User Manual
Page 148

2.4 Instruction Details
3-124
2
Chapter 2 Instructions
■ Calling a subroutine from an interrupt program
•
Subroutines can be called from interrupt programs.
•
A subroutine which is called from an interrupt program should be defined before
the call.
Note 1: Subroutine Nos. for SBN instructions cannot be duplicated in a program.
(It can be duplicated for CALL instructions.)
Note 2: When a subroutine is executed, the scan time is extended by the time
needed for subroutine execution.
Note 3: The following instructions cannot be used in subroutines:
STG, JMP, ENDS, INT, RETI, and MEMSW
Note 4: The following instructions can be used only in subroutines which are ex-
ecuted every scan time:
TMR, TMH, TMS, C, SFT, UDC, DIFU, DIFD, W-UE, W-DE, HKEY, ITVL,
and Differentiation type instruction (@xxx)
SBN
00
0001
00
CALL
0002
INT
0000
ENDH
RET
RETI
END
0500
Call
Program
Subroutine program
CALL / SBN / RET
KVNKA Chap 02_4bP.p65
08.3.11, 0:00 PM
124