XW2Z-200J-B9 Omron, XW2Z-200J-B9 Datasheet - Page 349

no-image

XW2Z-200J-B9

Manufacturer Part Number
XW2Z-200J-B9
Description
CONNECTOR CABLE 2M
Manufacturer
Omron
Datasheet

Specifications of XW2Z-200J-B9

Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
XW2Z200JB9
A-2
A-2-1
A subroutine is a program written between the SBN(092) and RET(093) instructions in a special subroutine
area. A subroutine is called from the main program using the SBS(091), MCRO(099), or JSB(982) instruction.
There are three types of interrupt tasks, which are described in the following table.
A-2-2
A normal subroutine is written between the SBN(092) and RET(093) instructions and called using the
SBS(091) instruction.
1. Write the program to be executed between SBN(092) and RET(093).
2. Set the subroutine number for the operand of SBN(092).
3. Call the subroutine using SBS(091)
322
Programming
Normal subroutines
Subroutines for
which parameters
are passed
Type of subroutine
Main program
(section 1)
Subroutine
(section 2)
Subroutine
(section 3)
Subroutines
What Are Subroutines?
Using Normal Subroutines
Normal subroutines are executed without passing parameters.
• Parameters can be passed to the subroutine.
• The results of processing in the subroutine can be returned to the
• Flags can be used to access the input condition to the subroutine
• It’s possible to check to see if a subroutine has been executed in the
• Parameters can be passed to and from the subroutine using storage
main program.
while the subroutine is being executed.
past.
registers.
Processing
Processing
SBS
100
SBN
100
RET
SBN
10
RET
Description
Set the subroutine
number to call. Here,
the subroutine number
is 100.
Set the the subroutine
number. Here, the
subroutine number is
100.
Set the the subroutine
number. Here, the
subroutine number is
10.
SBS(091)
MCRO(099)
JSB(982)
Calling instruction
Appendix A