Functions And Operation Examples Of Pointers For Branch - Mitsubishi Electric MELSEC FX3U Programming Manual

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition

4.12.2 Functions and operation examples of pointers for branch

The roles and operations of pointers for branch are as described below.
Because all of these pointers are combined with applied instructions, refer to the explanation of each
instruction for the detailed method.
1. Applied instructions using pointers for branch (P)
• CJ (FNC 00) (conditional jump)
X001
Label
P0
• CALL (FNC 01) call subroutine
X001
Label
P1
• Role of pointer P63 for jump to the END step
Label
P63
Should not be programmed.
FNC 00
P 0
CJ
Jump
FNC 01
P 1
CALL
Main program
Jump
FNC 06
FEND
Subroutine
program
FNC 02
Return
SRET
FNC 00
P 63
CJ
END
→ For details on interrupt function, refer to Chapter 36.
When X001 turns ON, the PLC jumps to a label
position specified by CJ (FNC 00) instruction,
and executes the subsequent program.
When X001 turns ON, the PLC executes a
subroutine in the label position specified by
CALL (FNC 01) instruction, and then returns to
the original position by SRET (FNC 02)
instruction.
P63 is a special pointer for jumping to the END step
when the CJ (FNC 00) instruction is executed.
Note that a program error will occur when P63 is
programmed as a label.
→ Refer to "5. Label unnecessary for the
4 Devices in Detail
4.12 Pointer [P and I]
pointer P63" in Section 8.1.
153
1
2
3
4
5
6
7
8
9
10

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents