Chapter 7: RLL
PLUS
Q. Isn't a Stage JMP just like a regular GOTO instruction used in software?
1
A. No, it is very different. A GOTO instruction sends the program execution immediately to
the code location named by the GOTO. A Stage JMP simply resets the Stage Bit of the
2
current stage, while setting the Stage Bit of the stage named in the JMP instruction. Stage
bits are 0 or 1, determining the inactive/active status of the corresponding stages. A stage
JMP has the following results:
3
• When the JMP is executed, the remainder of the current stage's rungs are executed, even if they
reside past(under) the JMP instruction. On the following scan, that stage is not executed, because it
4
is inactive.
• The Stage named in the Stage JMP instruction will be executed upon its next occurrence. If located
5
past (under) the current stage, it will be executed on the same scan. If located before (above) the
current stage, it will be executed on the following scan.
6
Q. How can I know when to use stage JMP, versus a Set Stage Bit or Reset Stage
Bit?
7
A. These instructions are used according to the state diagram topology you have derived:
• Use a Stage JMP instruction for a state transition... moving from one state to another.
8
• Use a Set Stage Bit instruction when the current state is spawning a new parallel state or stage
sequence, or when a supervisory state is starting a state sequence under its command.
• Use a Reset Bit instruction when the current state is the last state in a sequence and its task is
9
complete, or when a supervisory state is ending a state sequence under its command.
Q. What is an initial stage, and when do I use it?
10
A. An initial stage (ISG) is automatically active at powerup. Afterwards, it works just like any
other stage. You can have multiple initial stages, if required. Use an initial stage for ladder
11
that must always be active, or as a starting point.
Q. Can I have place program ladder rungs outside of the stages, so they are
12
always on?
A. It is possible, but it's not good software design practice. Place ladder that must always be
13
active in an initial stage, and do not reset that stage or use a Stage JMP instruction inside
it. It can start other stage sequences at the proper time by setting the appropriate Stage
14
Bit(s).
Q. Can I have more than one active stage at a time?
A
A. Yes, and this is a normal occurrence for many programs. However, it is important to
organize your application into separate processes, each made up of stages. And a good
process design will be mostly sequential, with only one stage on at a time. However, all the
B
processes in the program may be active simultaneously.
C
D
7–26
DL05 Micro PLC User Manual, 6th Edition, Rev. A
Stage Programming
Need help?
Do you have a question about the DL05 and is the answer not in the manual?