![Xinje XD Series Скачать руководство пользователя страница 93](http://html.mh-extra.com/html/xinje/xd-series/xd-series_user-manual_887444093.webp)
92
4-3-4
.
[FOR] and [NEXT]
Summary
Loop execute the program between
FOR
and
NEXT
with the specified times;
Loop starts [FOR]
16 bits
FOR
32 bits
-
Execution
condition
Rising/Falling edge
Suitable Models XD, XL
Hardware
requirement
-
Software
requirement
-
Loop ends [NEXT]
16 bits
NEXT
32 bits
-
Execution
condition
Normally ON/OFF,
Rising/Falling edge
Suitable Models XD, XL
Hardware
requirement
-
Software
requirement
-
Operands
Operands Function
Data Type
S
Program’s loop times between FOR and NEXT
16 bits, BIN
Suitable Soft Components
*Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD;
DM includes DM, DHM; DS includes DS, DHS.
FOR.NEXT instructions must be programmed as a pair. Nesting is allowed, and the nesting
level is 8.
The program after NEXT will not be executed unless the program between FOR and NEXT is
executed for specified times.
Between FOR and NEXT, LDP, LDF instructions are effective for one time. Every time when
M0 turns from OFF to ON, and M1 turns from OFF to ON, [A] loop is executed 5×6=30
times.
Every time if M0 turns from OFF to ON and M3 is ON, [B] loop is executed 5×7=35 times.
If there are many loop times, the scan cycle will be prolonged. Monitor timer error may occur,
please note this.
If NEXT is before FOR, or no NEXT, or NEXT is behind FEND, END, or FOR and NEXT
number is not equal, an error will occur.
Between FOR~NEXT, CJ nesting is not allowed. FOR~NEXT must be in pairs in one STL.
Operand
System
Constant Module
D
*
FD
TD
*
CD
*
DX
DY
DM
*
DS
*
K /H
ID
QD
S
●
●
Word
Description
Содержание XD Series
Страница 1: ...XD XL series PLC User manual Instruction WUXI XINJE ELECTRIC CO LTD Data No PD05 20201022 3 5 ...
Страница 210: ...209 ...
Страница 314: ...313 B Double click the middle part to modify ...