XW2B-80J7-1A Omron, XW2B-80J7-1A Datasheet - Page 287

no-image

XW2B-80J7-1A

Manufacturer Part Number
XW2B-80J7-1A
Description
RELAY UNIT
Manufacturer
Omron
Datasheet

Specifications of XW2B-80J7-1A

Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
XW2B80J71A
Subroutines
What Are Subroutines?
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.
Subroutines can be used in the following three ways with the FQM1.
Using Normal Subroutines
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)
264
Programming
Normal subroutines
Subroutines for
which parameters
are passed
Type of subroutine
Main program
(section 1)
Subroutine
(section 2)
Subroutine
(section 3)
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