Keyence Visual KV Series Manual de usuario Pagina 147

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 392
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 146
2.4 Instruction Details
1
2
3-123
Chapter 2 Instructions
Application of subroutine
When CALL00 is encountered during normal scan execution, the subroutine is
executed. At the completion of this subroutine, program execution returns to pro-
gram at B) immediately following CALL00. Then, the normal scan is continued until
an END instruction is encountered.
With no CALL instruction With CALL instruction
Nesting structure of a subroutine
Subroutine instructions can be nested up to 4 levels deep.
•A subroutine which is called from another subroutine should be defined before
the call.
00
CALL
0000
A)
B)
00
CALL
SBN
00
2008
ENDH
RET
END
B)
A)
Subroutine program
Normal scan
Subroutine
Program
Program
Program
Program
00
CALL
0000
B)
A)
Program
Program
Subroutine program
00
CALL
SBN
01
0001
01
CALL
0000
SBN
00
ENDH
RET
RET
END
Call
Program
Subroutine program
CALL / SBN / RET
KVNKA Chap 02_4bP.p65 08.3.11, 0:00 PM123
Vista de pagina 146
1 2 ... 142 143 144 145 146 147 148 149 150 151 152 ... 391 392

Comentarios a estos manuales

Sin comentarios