Using a Stage as a Supervisory Process
You may recall the light bulb on-off controller
example from earlier in this chapter. For the purpose
of illustration, suppose we want to monitor the
"productivity" of the lamp process, by counting the
number of on-off cycles which occurs. This
application will require the addition of a simple
counter, but the key decision is in where to put the
counter.
Powerup
Supervisor Process
Supervisor
Powerup
X0
OFF
X0
New stage programming students will typically try to place
the counter inside one of the stages of the process they are
trying to monitor. The problem with this approach is that
the stage is active only part of the time. In order for the
counter to count, the count input must transition from off
to on at least one scan after its stage activates. Ensuring this
requires extra logic that can be tricky.
In this case, we only need to add another supervisory stage
as shown above, to "watch" the main process. The counter
inside the supervisor stage uses the stage bit S1 of the main
process as its count input. Stage bits used as a contact let us
monitor a process!
NOTE: Both the Supervisor stage and the OFF stage are initial
stages. The supervisor stage remains active indefinitely.
Stage Counter
The counter in the above example is a special Stage Counter. Note that it does not have a
reset input. The count is reset by executing a Reset instruction, naming the counter bit (CT0
in this case). The Stage Counter has the benefit that its count may be globally reset from
other stages. The standard Counter instruction does not have this global reset capability. You
may still use a regular Counter instruction inside a stage... however, the reset input to the
counter is the only way to reset it.
X0
Push–ON
Main Process
Push–OFF
X0
DL05 Micro PLC User Manual, 6th Edition, Rev. A
Chapter 7: RLL
PLUS
Toggle
Ladder
X0
Program
ISG
S0
X0
SG
S1
ON
X0
SG
S2
SP1
X0
SG
S3
X0
ISG
S4
S1
Stage Programming
Y0
OFF State
S1
JMP
Push–On State
S2
JMP
ON State
10
Y0
OUT
11
S3
JMP
12
Push–Off State
S0
13
JMP
14
Supervisor State
SGCNT
CT0
K5000
7–17
1
2
3
4
5
6
7
8
9
A
B
C
D
Need help?
Do you have a question about the DL05 and is the answer not in the manual?