319
CHAPTER
9
Programming
Languages
Industrial Text & Video Company 1-800-752-8398
www.industrialtext.com
SECTION
3
PLC
Programming
rungs. The fence consists of an MCR rung with conditional inputs at the
beginning of the zone and an END rung with no conditional inputs at the end
of the zone. When the MCR rung condition is TRUE, it activates the
referenced output, allowing all rung outputs within the zone to be controlled
by their respective rung input conditions. When the MCR output is turned
OFF, it de-energizes all nonretentive (nonlatched) outputs within the zone.
A zone control last state (ZCL) instruction is similar to an MCR instruction—
it determines whether or not a group of ladder rungs will be evaluated. In this
instruction, a ZCL output with conditional inputs occurs at the start of the
fenced zone, while an END ZCL output with no conditional inputs occurs at
the end of the zone. When the referenced ZCL output is activated, the outputs
within the zone are controlled by their respective input conditions. When the
ZCL output is turned OFF, the outputs within the zone stay in their last state.
An end (END) instruction signifies the last rung of a master control relay or
zone control last state instruction. This instruction is usually unconditional
(i.e., programmed without any conditions to energize). An end instruction
reference address may or may not reference a MCR or ZCL. If a reference is
included, the END instruction will end that particular MCR or ZCL. If the
instruction does not include a reference address, it will terminate the latest
MCR or ZCL instruction.
ZONE CONTROL LAST STATE
JUMP TO
A jump to (JMP) instruction allows the control program sequence to be
altered if certain conditions exist. If the rung condition is TRUE, the jump to
coil reference address tells the processor to jump forward and execute the
target rung. The jump to address label specifies the target rung to jump to.
Using this instruction, a PLC can alter the order of execution of the control
program to execute a rung that needs immediate attention. Figure 9-55
illustrates a jump to instruction. This instruction may also be called a go to
instruction. Note that care should be exercised when jumping over timers and
counters. Jumping over timers and counters will cause the timing and
counting instructions not to be executed.
END
Like a jump to instruction, a go to subroutine (GOSUB) output instruction
also allows normal program execution to be altered if certain conditions exist.
In this instruction, if the rung condition is TRUE, the GOSUB coil reference
GO TO SUBROUTINE
ZCL
ZCL
END
JMP
GOSUB