Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 724

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

Sample program
0.00
A600.01
A601.02
(Equivalent)
0.00
100.01
101.02
200.01
201.02
CS/CJ/NSJ Series Instructions Reference Manual (W474)
i
When CIO 0.00 is ON in the following example, two
MCRO(099) instructions pass different input and output data
to subroutine 1.
1. The first MCRO(099) instruction passes the input data in
CIO 100 to CIO 103 and executes the subroutine. When
the subroutine is completed, the output data is stored in
CIO 300 to CIO 303.
2. The second MCRO(099) instruction passes the input data
in CIO 200 to CIO 203 and executes the subroutine. When
the subroutine is completed, the output data is stored in
CIO 400 to CIO 403.
1
1
S 1 : 101
S 2 : 102
S 3 : 103
1
A504.03
Subroutine 1
D+1 : 301
D+2 : 302
D+3 : 303
The second MCRO(099) instruction operates in the same way, but
the input data in CIO 200 to CIO 203 is passed to A600 to A603 and
the output data in A604 to A607 is passed to CIO 400 to CIO 403.
&
300.03
Just the addresses
are different.
400.03
&
Input data is passed when
the subroutine is called.
S : 100
Output data is passed when
returning from the subroutine.
D : 300
3. Instructions
Macro area input words
Input
Execution of
subroutine 1
Output
Macro area output words
A604
A605
A606
A607
687
3

Advertisement

Table of Contents
loading

Table of Contents