Hitachi NJI-350B User Manual

Page 157

Advertising
background image

Chapter 5 Instruction Specifications

5-107

Item number

Control instructions-7

Name

NEXT

Ladder format

Condition code

Processing time (

µs)

Remark

R7F4

R7F3

R7F2

R7F1

R7F0

Average Maximum

NEXT n

DER

ERR

SD

V

C

z

1]

z

z

z

Instruction format

Number of steps

38

Condition

Steps

NEXT n

2

Bit

Word

Double word

Usable I/O

X

Y

R,

M

TD, SS,

CU, CT

WX WY

WR,

WM TC DX DY

DR,

DM

C

o

nstant

Other

n

Code number

{ 0 to 49 (Decimal)

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

Error code

Error description

34

WRF001

H0003

Duplicate definition of NEXT

• 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

Error code

Error description

R7F3=1

WRF015

H0016

FOR undefined

H0046

FOR nesting overflow

Instruction for use

When
WR0000 > 0

When
WR0000 = 0

WR0000 = 512

WR0001 = 0

FOR 0(WR0000)

TC0(WR0001) = 0

WR0001 = WR0001 + 1

NEXT 0

R000 DIF0

To the next program

• 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.

N

EXT

n

Advertising