FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
14-1
14: P
ROGRAM
B
RANCHING
I
NSTRUCTIONS
Introduction
The program branching instructions reduce execution time by making it possible to bypass portions of the program whenever
certain conditions are not satisfied.
The basic program branching instructions are LABEL and LJMP, which are used to tag an address and jump to the address which
has been tagged. 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 left off.
LABEL (Label)
Applicable CPU Modules
Valid Devices
LJMP (Label Jump)
Applicable CPU Modules
Valid Devices
For the valid device address range, see pages 6-1 and 6-2
(Basic Vol.).
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 as required.
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 CPU module. For details about the user program execution errors, see Chapter 4 “User Program Execution Errors” on page 4-21.
This is the label number, from 0 to 255, used at the program address where the execution of program instructions
begins for a program branch.
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:
The same label number cannot be used more than once.
LABEL
***
FT1A-12
FT1A-24
FT1A-40
FT1A-40
FT1A-Touch
X
X
X
X
X
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
Label number
Tag for LJMP and LCAL
—
—
—
—
—
—
—
0-255
—
When input is on, jump to the address with label 0 through 255 designated 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
*****
FT1A-12
FT1A-24
FT1A-40
FT1A-48
FT1A-Touch
X
X
X
X
X
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
S1 (Source 1)
Label number to jump to
—
—
—
—
—
—
X
0-255
—
Содержание microsmart pentra
Страница 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Страница 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...