Programming Considerations for PLC-5 ProcessorsF–6
Publication
65566.5.1 - October 1996
Scan Logic Only When Needed
Use program control instructions to reduce program scan time with
these techniques:
• program a jump forward (or back) to avoid scanning portions of your
ladder logic not required under certain programmed conditions
• program a jump to a subroutine (and a return) when you require
intermittent use of a block of ladder logic. The processor scans it
only when needed
Use Single Transfer When Possible
When transferring data between the processor and I/O modules, the
use of single transfer programming is faster than block transfer for
up to 1-word transfers per rung, even if you add extra rungs for
transferring more words.
Other Considerations
Other considerations for a faster program scan are:
• select a faster processor
• dedicate an additional processor to critical functions
• put critical I/0 in the local I/O chassis rather than in a remote I/0 chassis
• minimize the use of remote I/O chassis
• minimize the queuing of block transfer instructions
• put most frequently accessed data in lower file addresses
(under word 254)
• minimize the number of and size of gaps between program file numbers
• use integer data rather than floating-point data
• use direct addressing
• select faster instructions
(arithmetic instructions are faster than compute)
What Are Subroutines?
A subroutine is a block of ladder logic stored in a separate program
file. Generally, it performs a specific function independently. The
use of subroutines helps you:
• simplify your ladder logic
• subdivide it into independent functions for custom re-engineering
• organize it for easier troubleshooting
• save scan time
Using Subroutines