IDEC MICROSmart FC6A Series Ladder Programming Manual page 274

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

13: P
B
ROGRAM
RANCHING
Example: LJMP and LABEL
The following example demonstrates a program that jumps to three different portions of the program depending on the input.
LJMP
I0
LJMP
I1
LJMP
I2
LABEL
0
M8121
LABEL
1
M8122
LABEL
2
M8123
Using the Timer Instruction with Program Branching
When the timer start input of the TML, TIM, TMH or TMS instruction is already on, countdown begins immediately at the location
jumped to, starting with the timer current value. When using a program branch, it is important to make sure that timers are
initialized when desired, after the jump. If it is necessary to initialize the timer instruction (set to the preset value) after the jump,
the timer's start input should be kept off for one or more scan cycles before initialization. Otherwise, the timer input on will not be
recognized.
Using the SOTU/SOTD Instructions with Program Branching
Check that pulse inputs of counters and shift registers, and inputs of single outputs (SOTU and SOTD) are maintained during the
jump, if required. Hold the input off for one or more scan cycles after the jump for the rising or falling edge transition to be
recognized.
LABEL
0
SOTU
I1
LJMP
M0
Since the END instruction is not executed as long as M0 remains on, output Q1 is not turned on even if input I1 is on.
13-2
I
NSTRUCTIONS
When input I0 is on, program execution jumps to label 0.
S1
0
S1
When input I1 is on, program execution jumps to label 1.
1
S1
When input I2 is on, program execution jumps to label 2.
2
END
M8121 is the 1-s clock special internal relay.
Q0
When jump occurs to label 0, output Q0 oscillates in 1-s increments.
END
M8122 is the 100-ms clock special internal relay.
Q1
When jump occurs to label 1, output Q1 oscillates in 100-ms increments.
END
M8123 is the 10-ms clock special internal relay.
Q2
When jump occurs to label 2, output Q2 oscillates in 10-ms increments.
END
Although normally, the SOTU instruction produces a pulse for
one scan, when used in a program branch the SOTU pulse will
last only until the next time the same SOTU instruction is
executed.
In the example on the left, the program branch will loop as long
Q1
as internal relay M0 remains on. However, the SOTU produces a
S1
pulse output only during the first loop.
0
FC6A S
MICROS
ERIES
MART
L
P
M
ADDER
ROGRAMMING
ANUAL
Q1 Internal
ON
Memory
OFF
ON
Q1 Output
OFF
FC9Y-B1726
END
END

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents