Label (Label); Ljmp (Label Jump) - IDEC MICROSmart FC6A Series Ladder Programming Manual

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

13: P
ROGRAM
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)

LABEL
***
Valid Devices
Device
Label number

LJMP (Label Jump)

LJMP
*****
Valid Devices
Device
S1 (Source 1)
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.
B
RANCHING
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
not
time is minimized by
executing the program branch unless input conditions are satisfied.
Note: A single label number cannot be used more than once.
Function
Tag for LJMP and LCAL
When input is on, jump to the address with label 0 through 255 assigned by S1.
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
not
execution does
Function
Label number
FC6A S
MICROS
ERIES
MART
I
NSTRUCTIONS
I
Q
M
return to the instruction following the LJMP instruction, after the program branch.
I
Q
M
L
P
M
ADDER
ROGRAMMING
ANUAL
R
T
C
D
P
Constant
R
T
C
D
P
Constant
X
FC9Y-B1726
Repeat
0-255
Repeat
0-255
13-1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents