Chapter VIII

Programmable Logic Controllers and Distributed Control Systems

Red Seal Practice study guide with diagrams.

Programmable Logic Controllers and Distributed Control Systems

Chapter Introduction

This chapter covers industrial programmable logic controllers (PLCs) and distributed control systems (DCS) , two fundamental technologies for the instrumentation and control technician. In Canada, these systems are governed by strict electrical standards, notably the Canadian Electrical Code, Part I (C22.1-21) and the applicable CSA standards for hazardous locations. You must master not only the internal operation of these systems, but also the commissioning, diagnostic, and safety procedures that surround them. This chapter is structured to cover all the Red Seal exam objectives.


General Architecture of Control Systems

Fundamental Definitions

A programmable logic controller (PLC) is a specialized industrial computer that cyclically executes a program to control processes. It differs from a PC in its robustness, its ability to operate in harsh environments (temperature, vibration, humidity), and its modular design.

A distributed control system (DCS) is an architecture where control functions are distributed across multiple controllers interconnected by a communication network. Each controller manages one area of the process, but the whole system is coordinated from a central control room.

Key Differences Between PLC and DCS

CharacteristicPLCDCS
**Scale**Small to medium (16 to 1024 I/O)Large (thousands of I/O)
**Architecture**Centralized or modularDistributed over network
**Cycle time**1 to 50 ms50 to 500 ms
**Redundancy**OptionalOften integrated (CPU, network, power supply)
**Database**Local to the programGlobal and centralized
**Historical data**LimitedIntegrated (trends, alarms, events)
**Typical application**Individual machine, small lineRefinery, chemical plant, power station

Components of a PLC System

Architecture of a programmable logic controller (PLC) — Scan Cycle Architecture of a programmable logic controller (PLC) — Scan Cycle 1. INPUTS (Inputs) Input module Sensors Switches 2. LOGIC (Program) CPU / Processor Memory Ladder 3. OUTPUTS (Outputs) Output module Valves Motors Scan Cycle — continuous sequence READ inputs EXECUTE program WRITE outputs The cycle repeats continuously (scan time: 10–100 ms) Scan Time: • Time required to execute one complete cycle • Typically 10 to 100 milliseconds • The longer the program, the slower the scan Importance of the cycle: • Inputs are all read together • The program is executed sequentially • Outputs are updated at the end LEGEND Scan particle Data / signal Figure 1: Typical architecture of a PLC — sequential scan cycle (Red Seal)
13.Central processing unit (CPU) : executes the program, manages memory, communicates with modules.
14.Input/output (I/O) modules : interface with the process (discrete, analog, counting, communication).
15.Power supply : converts line voltage (120 VAC or 24 VDC) to internal voltages (5 VDC, 24 VDC).
16.Communication module : network interface (EtherNet/IP, Modbus TCP, Profibus, DeviceNet).
17.Chassis or rack : mechanical support and internal communication bus.
18.Programming device : PC with dedicated software (RSLogix, TIA Portal, Unity Pro).

PLC Programming

Standardized Programming Languages (IEC 61131-3)

The IEC 61131-3 standard defines five programming languages for PLCs. The Red Seal exam requires you to know their characteristics and uses.

LanguageTypeTypical Use
**LD (Ladder Diagram)**GraphicalCombinational and sequential logic, traditional in North America
**FBD (Function Block Diagram)**GraphicalAnalog processing, PID, complex functions
**ST (Structured Text)**TextualMathematical calculations, loops, algorithms
**IL (Instruction List)**TextualCompact programs, European legacy
**SFC (Sequential Function Chart)**GraphicalProcess sequences, steps and transitions

PLC Program Structure

The program executes in a cyclic scan according to the following sequence:

26.Read inputs : the CPU copies the state of all inputs into the image memory.
27.Execute program : instructions are executed sequentially.
28.Write outputs : results are transferred from image memory to the output modules.
29.Communication and diagnostic tasks : network updates, self-tests.

Scan time is the total duration of one cycle. It must be less than the process time constant. For a fast process (servo motor), aim for 5 to 10 ms; for a slow process (tank temperature), 100 to 500 ms is sufficient.

I/O Addressing

Each input or output has a unique address. The format varies by manufacturer, but the principle remains the same:

Discrete input : %I0.0, %I0.1, ... (or 0:0.0, 0:0.1)
Discrete output : %Q0.0, %Q0.1, ...
Analog input : %IW0, %IW1, ... (16-bit word)
Analog output : %QW0, %QW1, ...

Exam trap : analog addresses are often in words (16 bits), not bits. An 8-channel analog card occupies 8 address words, or 16 bytes.

Essential Instructions

InstructionLD SymbolFunction
Normally open (NO) contactTrue if input is 1
Normally closed (NC) contact/True if input is 0
Output coil—( )—Activates output if rung is true
Latch coil (SET)—(S)—Maintains output active
Unlatch coil (RST)—(R)—Deactivates output
Timer on-delay (TON)—(TON)—Delay before activation
Timer off-delay (TOF)—(TOF)—Delay after deactivation
Counter up (CTU)—(CTU)—Counts rising edges
Comparator—[=]—, —[>]—, —[<]—Compares two values

Timers and Counters: Practical Calculations

TON timer : output Q goes to 1 after a delay PT (preset time) when input IN is 1. The current value ET (elapsed time) increments at each time base interval (often 1 ms, 10 ms, or 100 ms).

Calculation example : A TON with a time base of 10 ms and a preset value of 500 gives a delay of:

500 × 10 ms = 5000 ms = 5 seconds

CTU counter : output Q goes to 1 when the current value CV reaches the preset value PV. The counter increments on each rising edge of input CU.

Exam trap : always check the time base of the timer. A preset of 100 with a 1 ms base gives 0.1 s, but with a 100 ms base gives 10 s. This error is common.


Distributed Control Systems (DCS)

Typical DCS Architecture

A DCS is divided into three hierarchical levels:

50.Field level : sensors, actuators, transmitters, control valves.
51.Control level : local controllers (control stations) that execute PID control loops, sequential logic, and alarms.
52.Supervision level : historical data servers, operator stations (HMI), engineering servers.

Industrial Communication Networks

ProtocolTypeTypical SpeedApplication
**EtherNet/IP**Industrial Ethernet10/100/1000 MbpsPLC, DCS, vision, motion control
**Modbus TCP**Industrial Ethernet10/100 MbpsPLC, instrumentation, DCS
**Profibus DP**Fieldbus12 Mbps maxDecentralized I/O, drives
**Foundation Fieldbus (H1)**Fieldbus31.25 kbpsSmart instrumentation, distributed PID
**HART**4-20 mA loop1.2 kbpsAnalog transmitters with digital communication
**DeviceNet**Fieldbus500 kbps maxSensors, actuators, I/O

Redundancy in DCS

Redundancy is a common requirement in critical processes. Typical configurations include:

CPU redundancy : two processors in primary/standby mode. Failover must be < 100 ms.
Network redundancy : two independent communication paths (rings or meshes).
Power supply redundancy : dual power supplies with automatic transfer (UPS + mains).
I/O redundancy : dual modules with parallel wiring.

Golden rule : redundancy does not protect against all failures. It protects against the failure of a single component, not against programming or wiring errors.


Commissioning and Diagnostics

PLC Commissioning Procedure

65.Mechanical verification : tighten connections, check cable continuity, ensure no short circuits.
66.Power supply verification : measure input voltage (120 VAC ±10%, 24 VDC ±5%), verify grounding.
67.Communication test : establish the link between the programming PC and the CPU (IP address, network node).
68.Program download : transfer the program to the CPU, verify no compilation errors.
69.Input testing : force each input to 1 and 0, verify correspondence with wiring.
70.Output testing : activate each output individually, verify the corresponding actuator.
71.Functional test : run the program in simulation mode, then in real mode with the process.
72.Documentation : record results, modifications, and tuning parameters.

Diagnostic Tools

Status LEDs on the CPU and modules: RUN, FAULT, I/O, COMM.
Watch table : view and modify values in real time.
Forcing : impose a value on an input or output to test logic.
Single-step mode : execute the program instruction by instruction.
Event log : history of alarms, errors, and modifications.

Exam trap : forcing an output does not modify the program's image memory. If the program rewrites that output on the next scan, the force is overridden. Use forcing only for testing, never in production without authorization.


Safety and Canadian Standards

Canadian Electrical Code, Part I

The Canadian Electrical Code, Part I (C22.1-21) is the national standard for electrical installations. Relevant articles for control systems include:

Rule 8-200 : supply capacity and overcurrent protection.
Rule 10-200 : grounding of equipment and control systems.
Rule 18-000 : installations in hazardous locations (zone classification).
Rule 24-000 : installations of alarm and signaling systems.

Hazardous Locations

PLCs and DCS installed in classified areas must be certified to CSA standards. Canadian classifications follow the zone system (Zone 0, 1, 2) for gases and vapors, and the division system (Division 1, 2) for dusts.

ClassificationGases/vaporsDusts
**Zone 0 / Division 1**Continuous or frequent presenceContinuous presence
**Zone 1 / Division 1**Occasional presence during normal operationOccasional presence
**Zone 2 / Division 2**Rare and short-duration presenceRare presence

Equipment requirements :

CSA certification or other accredited body (ULC, FM).
Class marking (Class I, II, III) and zone marking (Zone 0, 1, 2).
Protection by explosion-proof enclosure, intrinsic safety (IS), or pressurization.

Practical rule : in Zone 1, use intrinsic safety barriers for 4-20 mA signals. In Zone 2, standard equipment with Type "n" enclosures may suffice.

CSA Standards for Control Systems

CSA C22.2 No. 142 : process control equipment.
CSA C22.2 No. 213 : non-incendive equipment for hazardous locations.
CSA B149.1 : natural gas and propane code (relevant if the process uses gas).
CSA Z462 : workplace electrical safety (relevant for work on energized equipment).

Communication and System Integration

HART Protocol

The HART (Highway Addressable Remote Transducer) protocol superimposes a digital signal on the analog 4-20 mA loop. Key characteristics:

Communication frequency: 1.2 kbps (FSK).
Maximum distance: 3000 m with shielded cable.
Up to 15 devices per loop in multidrop mode.
Variables: PV (primary variable), SV, TV, QV (secondary variables).

Calculation example : a HART transmitter with a range of 0 to 100 bar and a signal of 12 mA corresponds to:

(12 mA − 4 mA) / (20 mA − 4 mA) × 100 bar = 8/16 × 100 = 50 bar

Modbus Protocol

Modbus is a widely used master-slave protocol. Main functions:

Function 01 : read discrete outputs.
Function 02 : read discrete inputs.
Function 03 : read holding registers (16-bit words).
Function 04 : read input registers.
Function 05 : write a single discrete output.
Function 06 : write a single register.
Function 16 : write multiple registers.

Modbus addressing : addresses are base 0 in the protocol, but base 1 in most software. A register address of 40001 in the data convention corresponds to address 0 in the protocol.


Troubleshooting and Problem Solving

Systematic Methodology

124.Identify the symptom : which part of the process is affected?
125.Isolate the cause : is it a hardware, software, electrical, or process problem?
126.Check inputs : are the sensors sending the correct values?
127.Check the program : is the logic correct? Are timers and counters within expected values?
128.Check outputs : are the actuators receiving the correct signals?
129.Check communication : are network exchanges smooth? Are there frame errors?
130.Document and correct : apply the fix, test, document.

Common Programming Errors

ErrorSymptomCorrection
Reversed address (input/output)Output does not respondCheck wiring and address
Timer with wrong time baseDelay too long or too shortRecalculate PT = desired time / base
Infinite loop (unconditional jump)Abnormally long scan timeCheck JMP instructions
Output conflict (two active rungs)Unstable outputUse SET/RST or exclusive logic
Analog value out of rangeSaturation or erroneous valuesCheck sensor range and calibration

Summary

A PLC cyclically executes a program (read inputs, execute, write outputs) with a typical scan time of 1 to 50 ms.
A DCS distributes control across multiple interconnected controllers, with a global database and integrated historical data.
The five IEC 61131-3 languages are LD, FBD, ST, IL, and SFC. Ladder is the most common in North America.
Timers and counters require precise calculation of the time base and preset.
Commissioning follows a strict procedure: mechanical verification, power supply, communication, download, I/O tests, functional test.
The Canadian Electrical Code, Part I imposes rules for power supply, grounding, and hazardous locations.
Hazardous locations are classified into zones (0, 1, 2) and divisions (1, 2); equipment must be CSA certified.
The HART protocol superimposes a digital signal on the 4-20 mA loop; Modbus is a master-slave protocol with standardized functions.
Troubleshooting follows a systematic method: symptom, isolation, check inputs, program, outputs, communication.

Pitfalls to Avoid

146.Confusing time base and preset : a TON with a 10 ms base and a preset of 100 gives 1 s, not 100 s. Always check the unit.
147.Forgetting the image memory : outputs are written at the end of the scan, not immediately. An output modified mid-program does not physically change until the end of the cycle.
148.Neglecting grounding : poor grounding causes communication errors and module damage. Follow Rule 10-200 of the Canadian Electrical Code.
149.Using forcing in production : forcing can mask a real fault and cause an accident. Use it only in testing, with authorization.
150.Ignoring zone classification : installing non-certified equipment in Zone 1 is dangerous and illegal. Always check CSA certification.
151.Confusing Modbus addresses : address 40001 in software corresponds to address 0 in the protocol. An off-by-one error is common.
152.Forgetting power supply redundancy : in a DCS, the power supply is often the single point of failure. Check sources and UPS units.
153.Not documenting modifications : every program change must be recorded with the date, author, and reason. The exam also assesses good professional practices.
154.Underestimating scan time : a program that is too long or an infinite loop slows down the CPU and can cause watchdog timeouts. Monitor cycle time.
155.Confusing protocols : EtherNet/IP and Modbus TCP both use Ethernet, but their frame formats and addressing differ. Do not interchange them.

Final Exam Tips

Memorize typical ranges : 4-20 mA, 0-10 VDC, RTD PT100 (100 Ω at 0 °C), thermocouple types J, K, T.
Practice conversions : mA to engineering units, bits to analog values (12 bits = 0 to 4095, 16 bits = 0 to 65535).
Know the standards by their full names : Canadian Electrical Code, Part I; CSA C22.2 No. 142; CSA B149.1.
Read questions twice : Red Seal exams often contain wording traps (negations, double negatives, "except", "not").
Manage your time : approximately 1 minute per question. If a question is too difficult, mark it and come back later.

This chapter covers the essentials to pass the PLC/DCS section of the exam. Review wiring diagrams, timing calculations, and safety standards. Good luck with your preparation.

Ready to test this chapter?

Practice with exam-aligned questions and timed simulations.

Start Practicing Free