Pointer (P); Global Pointer - Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

21.12

Pointer (P)

This device is used in the jump instructions (the CJ/SCJ/JMP instruction) and/or subroutine program call instructions (such as
the CALL instruction). There are two types of pointer: the global pointer and the local pointer. Use the pointer when:
• Specifying the jump destination and label of the jump instructions (the CJ/SCJ/JMP instruction).
• Specifying the call destination and label (the head of subroutine program) of the subroutine call instructions (such as the
CALL instruction).

Global pointer

This is the pointer which enables calling by the subroutine call instruction from all the program being executed.
Program 1 (Program group A)
CALL
P1000
Program 2 (Program group B)
CALL
P1001
Effective use of number of points
The number of points for global pointers can be obtained with the following formula: "pointer number of points specified by the
parameter" - "the total point number of local pointer being used for each program".
Precautions
This section describes the precautions when the global pointer is used.
• A global pointer with the same pointer number cannot be set as a label in multiple points.
Program 3 (Program group C)
P1000
RET
P1001
RET
21
21 DEVICES
361
21.12 Pointer (P)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents