10 - 53 10 - 53
MELSEC-Q
10 DEVICES
10.9 Pointers (P)
(1) Definition
Pointer devices are used in jump instructions (CJ, SCJ, JUMP) or sub-routine call
instructions (CALL, ECALL).
A total of 4096 pointers can be used (total for all programs being executed).
(2) Pointer applications
(a) Pointers are used in jump instructions (CJ, SCJ, JMP) to designate jump
destinations and labels (jump destination beginning).
(b) Pointers are used in sub-routine CALL instructions (CALL, CALLP) to
designate the CALL destination and label (sub-routine beginning).
(3) Pointer types
There are 2 pointer types: "local pointers (Section 10.9.1)" which are used
independently in programs, and "common pointers (Section 10.9.1)" which are
used to call sub-routine programs from all programs executed in the CPU.
10.9.1 Local pointers
(1) Definition
(a) Local pointers are pointers which can be used independently in program
jump instructions and sub-routine call instructions.
Local pointers cannot be used from other program jump instructions and
sub-routine CALL instructions.
Use an ECALL instruction to call a sub-routine subprogram in a program file
that contains local pointers.
(b) The same pointer No. can be used in each of the programs.
Program B
Same pointer is
used.
Program A
P0
P0
CALL P0
FEND
RET
END
CALL P0
FEND
RET
END
REMARK
For further information on jump instructions and sub-routine call instructions, see the
QCPU (Q Mode)/QnACPU Programming Manual (Common Instructions).