Djnz (Decrement Jump Non-Zero) - IDEC MICROSmart FC6A Series Ladder Programming Manual

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

Advertisement

DJNZ (Decrement Jump Non-zero)

DJNZ
*****
Valid Devices
Device
S1 (Source 1)
S2 (Source 2)
For valid device address ranges, see "Device Addresses" on page 2-1.
Since the DJNZ instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used.
The label number can be 0 through 255. Make sure that a LABEL instruction of the label number used for a DJNZ instruction is programmed. When
designating S2 using a data register, 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.
When input is on, the value stored in the data register assigned by S1 is decremented by one and
S1
S2
is checked. If the resultant value is not 0, program execution jumps to address with label 0
*****
through 255 assigned by S2. If the decrement results in 0, no jump takes place, and program
execution proceeds with the next instruction.
Function
Decrement value
Label number to jump to
FC6A S
MICROS
ERIES
MART
13: P
I
Q
M
L
P
M
ADDER
ROGRAMMING
ANUAL
B
ROGRAM
RANCHING
R
T
C
D
P
Constant
X
X
0-255
FC9Y-B1726
I
NSTRUCTIONS
Repeat
13-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents