EasyManuals Logo

IDEC OpenNet series User Manual

IDEC OpenNet series
427 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #262 background image
O
PEN
N
ET
C
ONTROLLER
U
SER
S
M
ANUAL
18-1
18: P
ROGRAM
B
RANCHING
I
NSTRUCTIONS
Introduction
The program branching instructions reduce execution time by making it possible to bypass portions of the program when-
ever certain conditions are not satisfied.
The basic program branching instructions are LABEL and LJMP, which are used to tag an address and jump to the address
which has been tagged. Programming tools include “either/or” options between numerous portions of a program and the
ability to call one of several subroutines which return execution to where the normal program left off.
LABEL (Label)
Valid Operands
LJMP (Label Jump)
Valid Operands
For the valid operand number range, see page 6-2.
When T (timer) or C (counter) is used as S1, the timer/counter current value is read out.
Since the LJMP instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction
should be used as required.
Note:
Make sure that a LABEL instruction of the label number used for a LJMP instruction is programmed. If a matching
label does not exist, a user program execution error will result, turning on special internal relay M8004 and the ERROR LED.
Operand Function I Q M R T C D L Constant Repeat
Label number Tag for LJMP, LCAL, and DJNZ ———————— 0-255
Operand Function I Q M R T C D L Constant Repeat
S1 (Source 1) Label number to jump to XXXXXXXX 0-255
This is the label number, from 0 to 255, used at the program address where the execution of pro-
gram instructions begins for a program branch.
An END instruction may be used to separate a tagged portion of the program from the main pro-
gram. In this way, scan time is minimized by not executing the program branch unless input condi-
tions are satisfied.
Note: The same label number cannot be used more than once. When a user program including
duplicate label numbers is downloaded to the CPU, a user program syntax error will result, turning
on the ERROR LED.
LABEL
***
When input is on, jump to the address with label 0 through 255 designated by S1.
When input is off, no jump takes place, and program execution proceeds with the next
instruction.
The LJMP instruction is used as an “either/or” choice between two portions of a pro-
gram. Program execution does not return to the instruction following the LJMP instruc-
tion, after the program branch.
LJMP S1
*****
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IDEC OpenNet series and is the answer not in the manual?

IDEC OpenNet series Specifications

General IconGeneral
BrandIDEC
ModelOpenNet series
CategoryController
LanguageEnglish

Related product manuals