Hitachi HIDIC MICRO-EH Applications Manual page 157

Table of Contents

Advertisement

Item number
Control instructions-7
Ladder format
NEXT n
Instruction format
NEXT n
Usable I/O
n
Code number
Function
Subtracts 1 from the number of times repeated (s) for the FORn (s) instruction of the same code number, then jumps to
FORn (s).
Notes
This instruction is checked prior to execution, and when there is an error, the following error code is set in the special
internal output WRF001. Also, the CPU error code '34' is set to special internal output WRF000.
CPU error code
Special internal output
34
If an error is generated during the execution of the instruction, an error code will be set in the special internal outputs R7F3
and WRF015, and the following program will be executed.
Special internal output
R7F3=1
WRF015
Instruction for use
R000 DIF0
WR0000 = 512
WR0001 = 0
When
FOR 0(WR0000)
WR0000 > 0
TC0(WR0001) = 0
WR0001 = WR0001 + 1
NEXT 0
When
WR0000 = 0
To the next program
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
1]
Number of steps
Condition
Bit
R,
TD, SS,
X
Y
M
CU, CT
WX WY
Error code
WRF001
H0003
Error code
H0016
FOR undefined
H0046
FOR nesting overflow
• When R000 is turned on, the progress value (TC n) of the timer or counter is
cleared with 0 for 512 points.
• Once the FOR to NEXT starts, the instruction keeps executing until (s) is "0."
• FOR0 (WR0000) performs instructions after TC0 (WR0001) = 0 while
WR0000>0, subtracts "1" from WR0000 at NEXT0, then jumps to FOR0
(WR0000).
• FOR0 (WR0000) jumps to the next instruction within the current box upon
WR0000 = 0.
5-107
Chapter 5 Instruction Specifications
NEXT
Processing time (µs)
R7F1
R7F0
Average Maximum
V
C
38
Steps
2
Word
Double word
WR,
DR,
WM TC DX DY
DM
Error description
Duplicate definition of NEXT
Error description
Remark
Other
0 to 49 (Decimal)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents