Delta-electronics Extension Digital I/O Module DOP-EXIO14RAE Instrukcja Użytkownika Strona 92

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 157
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 91
Appendix D Use of Application Instructions|DOP-EXIO Series
Revision March, 2008, Doc. Name: 2007PDD23000014 D-11
Mnemonic Operands Function
FOR
S
Start of a FOR-NEXT Loop
Bit Devices Word Devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
y Note:
1. No contact to drive the instruction is required.
16-bit instruction (3 Steps)
FOR
Continuous
execution
- -
32-bit instruction
- - - -
y Flags: None
Operands:
S
: The number of repeated nested loops
Mnemonic Operands Function
NEXT
None End of a FOR-NEXT Loop
Bit Devices Word Devices
X Y M S K H KnX KnY KnM KnS T C D E F
y Note:
1. No operand.
2. No contact to drive the instruction is required.
16-bit instruction (1 Step)
NEXT
Continuous
execution
- -
32-bit instruction
- - - -
y Flags: None
Explanations:
1. FOR instruction indicates FOR ~ NEXT loops executing back and forth N times before escaping
for the next execution.
2. N = K1 ~ K32,767. N is regarded as K1 when N 1.
3. When FOR~NEXT loops are not executed, the user can use the CJ instruction to escape the
loops.
4. Error will occur when
a) NEXT instruction is before FOR instruction.
b) FOR instruction exists but NEXT instruction does not exist.
c) There is NEXT instruction after FEND or END instruction.
d) The number of instructions between FOR ~ NEXT differs.
5. FOR~NEXT loops can be nested for maximum five levels. Be careful that if there are too many
loops, the increased PLC scan time may cause timeout of watchdog timer and error. Users can
use WDT instruction to modify this problem.
Program Example 1:
After program A has been executed for 3 times, it will resume its execution after NEXT instruction.
Program B will be executed for 4 times whenever program A is executed once. Therefore, program B
will be executed 3 × 4 = 12 times in total.
Przeglądanie stron 91
1 2 ... 87 88 89 90 91 92 93 94 95 96 97 ... 156 157

Komentarze do niniejszej Instrukcji

Brak uwag