Using program control instructions, C-14, Using jmp/lbl instructions – Rockwell Automation 1785-Lxxx Enhanced and Ethernet PLC-5 Programmable Controllers User Manual

Page 300: Using for/nxt instructions

Advertising
background image

Publication 1785-UM012D-EN-P - July 2005

C-14 Maximizing System Performance

Using Program Control
Instructions

Scan time can increase based on how you use JMP/LBL instructions and
FOR/NXT instructions.

Using JMP/LBL Instructions

Keep in mind these issues when programming JMP/LBL instructions:

Using FOR/NXT Instructions

The FOR/NXT instructions have the same impact on execution time as the
JMP instruction. The execution for a FOR/NXT loop depends on the
program file that contains the instructions.

The estimated execution time for a FOR/NXT loop is:
8.1 + (number_of_loops

15.9) + (file_number

2)

0.96

The greater the program file number, the longer it takes to complete the
FOR/NXT loops.

Instruction

Consideration

JMP

The execution time required for a JMP instruction depends on
the program file that contains the JMP instruction.

The estimated execution time for a JMP instruction is:

8.9 + (file_number

2)

0.96

The greater the program file number, the longer it takes to
complete a scan of the JMP instruction.

LBL

Each LBL instruction uses 2 words of memory in the program file
plus additional memory, depending on the label number itself.
Each label number is placed in a label table. Each entry in the
label table uses 2 words of memory, starting from label 0. For
example, LBL 10 uses 22 (2 words

11th entry) words of

memory in the label table.

If you later delete LBL 10, the label table does not deallocate
previously used space. The only way to recover this space is to
upload and then re-download the program.

Advertising