Page 11 - AutomationNOTEBOOK volume 41
P. 11
PLC Speaking
Importance of PLC Scan Time in any Control System
When designing a PLC controlled system, one aspect that should not be
overlooked is how the PLC scan will affect your operation. The PLC scan consists of a sequence of operations the CPU will follow repeatedly. The amount of time the CPU needs to complete this sequence is known as scan time and it can adversely affect your process if you are not careful.
It may seem to the naked eye, when an output is set ON in the ladder code that this change is imme- diately reflected in the output card. Or that when an input is activated, the CPU instantly sees it. But that is not actu-
ally the case. The output and
the input will only be updated once the PLC scan gets to the appropriate step in the sequence. To us, that seems immediate,
but to a computer it may not be. With inputs, the time it takes the CPU to notice a change can vary depending on where the CPU was in the sequence when the input turned on. For outputs, the CPU will completely execute the ladder program before changing the output state on the output card. Although extremely fast, these changes are not instantaneous.
The Sequence
As a programmer, you’re mostly concerned with three main steps in the PLC scan - the Update Inputs, Execute Program and Update Outputs steps. But there are other steps that need to be considered as well. Most PLCs will have similar sequences, some with a few variations, and an example is as follows:
inputs from specialty modules, like high-speed counters, and remote I/O racks
6. Service Peripherals – in this step, the CPU will handle any requests from the serial or Ethernet communication ports
7. Executes Program – if in the RUN mode, the CPU will now exe- cute the ladder program using the updated inputs
8. Updates Outputs – If there
were any output state changes from the ladder execution, the CPU will now write them to the out- put tables and in turn the output cards
9. Diagnostics/ Housekeeping – finally the CPU will run a self-check and tie up any loose ends before repeating the scan
- returning to the “Update Inputs” step
What to watch for
Modern PLCs can run the
scan in milli-seconds and for most applications that’s not
a problem. But as your code complexity increases, the time
it takes to execute can begin
to slow the CPU. This can be greatly alleviated by using program efficiencies like sub- routines and task management. Another thing to watch for regard- ing CPU scan time is the amount
continued>>
1. Power Up – this is the
starting point when the PLC is first powered
2. Initialize Hardware – at this point, the CPU will verify and ini- tialize the installed hardware
3. Restores Retentive Values – any CPU memory locations that were configured as retentive will be restored to their previous value
4. Updates Inputs – the CPU will now read in the inputs stored in the input table, on the next scan this will be the starting point for the CPU
5. Updates Specialty and Remote Inputs – the CPU will take in any
PLC Speaking
Go to Article
Editor's Note
New Product Focus
- WEG High-Performance AC Drives
- FREE Online PLC Training
FYI
Cut to Length Q&A: Bulk Multi-Conductor Cable
PLC Speaking
Business Notes
Cover Story
Mastering Machine Maintenance
What's New
User Solutions
Open System Provides Precise Temperature Control
Student Spotlight
Copley High School Student Project and Update
Break Room
Brain Teasers
www.automationnotebook.com | Issue 41