Table of Contents

Advertisement

MCRO

Instruction
MACRO
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
Not allowed
Operands
Operand
N
Subroutine number
S
First input parameter word
D
First output parameter word
N: Subroutine number
Specifies the subroutine number between 0 and 1023 decimal.
Note For CJ1M-CPU11 and CJ1M-CPU21 CPU Units, the subroutine number must be between the range 0 to 255
decimal.
Operand Specifications
Word addresses
Area
CIO
WR
HR
N
---
---
---
S
OK
OK
OK
D
Combined-use instructions
SBN (subroutine entry) instructions and RET (subroutine return) instructions
Flags
Name
Error Flag
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Mnemonic
Variations
MCRO
@MCRO
Block program areas
Step program areas
OK
OK
Description
AR
T
C
DM
EM
---
---
---
---
---
OK
OK
OK
OK
OK
Label
ER
• ON if nesting exceeds 16 levels.
• ON if the specified subroutine number does not exist.
• ON if a subroutine calls itself.
• ON if a subroutine being executed is called.
• ON if the specified subroutine is not defined in the current task.
• OFF in all other cases.
Function
code
Calls the subroutine with the specified subroutine
number and executes that program using the input
099
parameters in S to S+3 and the output parameters
in D to D+3.
MCRO
MCRO(099)
N
N: Subroutine number
S
S: First input parameter word
D
D: First output parameter word
Subroutines
OK
Data type
---
---
---
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
---
---
OK
---
OK
OK
---
Operation
3. Instructions
Function
SFC action or transition
Interrupt tasks
programs
OK
Not allowed
Size
1
4
4
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
---
---
---
OK
3
TR
bits
---
---
693

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF