
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
13-1
13: P
ROGRAM
B
RANCHING
I
NSTRUCTIONS
Introduction
This chapter describes the ladder program branching instructions that are used for branching program execution, looping ladder
program execution, and creating ladder program subroutines.
Ladder program instruction execution branches from the LJMP (label jump) instruction and the DJNZ (decrement jump non-zero)
instruction to the location where the LABEL instruction has been entered. Programming tools include “either/or” options between
numerous portions of a program and the ability to call one of several subroutines which return execution to where the normal
program stopped.
For the differences between user-defined macros and subroutines, see "Differences between User-defined Macros and
Subroutines" on page A-6.
LABEL (Label)
Valid Devices
LJMP (Label Jump)
Valid Devices
For valid device address ranges, see "Device Addresses" on page 2-1.
Since the LJMP instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used.
Note:
Make sure that a LABEL instruction of the label number used for a LJMP instruction is programmed. When designating S1 using other than a
constant, the value for the label is a variable. When using a variable for a label, make sure that all probable LABEL numbers are included in the user
program. If a matching label does not exist, a user program execution error will result, turning on special internal relay M8004 and the ERR LED on
the FC6A Series MICROSmart. For details about the user program execution errors, see "User Program Execution Errors" on page 3-10.
This instruction sets the label number.
The label number that can be specified is 0 to 255.
An END instruction may be used to separate a tagged portion of the program from the main program. In this way, scan
time is minimized by
not
executing the program branch unless input conditions are satisfied.
Note:
A single label number cannot be used more than once.
LABEL
***
Device
Function
I
Q
M
R
T
C
D
P
Constant
Repeat
Label number
Tag for LJMP and LCAL
—
—
—
—
—
—
—
—
0-255
—
When input is on, jump to the address with label 0 through 255 assigned by S1.
When input is off, no jump takes place, and program execution proceeds with the next instruction.
The LJMP instruction is used as an “either/or” choice between two portions of a program. Program
execution does
not return to the instruction following the LJMP instruction, after the program branch.
LJMP
S1
*****
Device
Function
I
Q
M
R
T
C
D
P
Constant
Repeat
S1 (Source 1)
Label number
—
—
—
—
—
—
X
—
0-255
—
Содержание MICROSmart FC6A Series
Страница 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Страница 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 158: ...6 DATA COMPARISON INSTRUCTIONS 6 10 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 216: ...10 DATA CONVERSION INSTRUCTIONS 10 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 248: ...11 WEEK PROGRAMMER INSTRUCTIONS 11 32 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 288: ...15 INTERRUPT CONTROL INSTRUCTIONS 15 4 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 294: ...16 COORDINATE CONVERSION INSTRUCTIONS 16 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 374: ...18 PULSE OUTPUT INSTRUCTIONS 18 78 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 Setting ...
Страница 450: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 574: ...27 FLOW CALCULATION INSTRUCTIONS 27 28 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 583: ...FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 28 9 28 USER DEFINED MACRO INSTRUCTION ...
Страница 584: ...28 USER DEFINED MACRO INSTRUCTION 28 10 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Страница 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...