Industrial Automation & PLC

Chapter 2
Electrical Control and Digital Logic Foundations

Bachelors Program in Electrical Engineering
Industrial Automation & PLC   •   Bachelor

Electrical Control and Digital Logic Foundations

Introduction

Industrial automation is built on a small set of ideas: electrical energy is switched by controlled devices, information is represented by signal states, and decisions are implemented through logic. A programmable logic controller (PLC) combines these ideas in a rugged, programmable form. To design, commission, troubleshoot, or safely modify an automated system, an engineer must understand both traditional relay control and its digital equivalent.

This chapter develops the foundations required for PLC programming and electrical control. It introduces electrical schematics, relay devices, Boolean algebra, number systems, truth tables, combinational and sequential logic, latching, interlocking, and fail-safe design. The emphasis is not merely on symbolic manipulation, but on translating a physical requirement into a safe and testable control system.

Learning Objectives

By the end of this chapter, the reader should be able to:

  1. Interpret common electrical control symbols and schematic conventions.
  2. Distinguish normally open and normally closed contacts and explain their physical meaning.
  3. Apply Boolean algebra and truth tables to control problems.
  4. Convert between binary, decimal, and hexadecimal representations.
  5. Analyze combinational and sequential control circuits.
  6. Design latching, interlocking, and permissive circuits.
  7. Explain PLC scan operation and the relationship between relay logic and ladder logic.
  8. Apply fail-safe principles to emergency stops, guards, overloads, and loss-of-signal conditions.
  9. Identify practical, safety, and maintenance limitations of control designs.

1. Electrical Control as an Information System

An electrical control system contains three related elements:

  • Inputs: push buttons, selector switches, sensors, limit switches, overload contacts, and process transmitters.
  • Logic: relay contacts, timers, counters, PLC instructions, or digital gates that evaluate conditions.
  • Outputs: contactors, solenoid valves, motor starters, lamps, alarms, and variable-speed-drive commands.

A control signal is often represented by two logical states. In positive logic, a high or energized signal is assigned the value 1 and a low or de-energized signal the value 0. The logical value is not identical to a voltage value; the actual voltage depends on the control system, such as 24 V DC or 120 V AC.

A useful abstraction is:

Y = f(X₁, X₂, …, Xₙ)

Here, X₁ through Xₙ are input states, Y is an output state, and f is the control function. The expression describes logical dependence, not power consumption or electrical loading.

In industrial equipment, control circuits are normally separated from power circuits. A motor may operate at 400 V AC while its contactor coil and PLC inputs operate at 24 V DC. This separation improves safety, simplifies interfacing, and reduces the energy present in operator devices.

2. Reading Electrical Control Schematics

A schematic shows functional relationships rather than the physical location of components. Common conventions include:

  • Supply lines are drawn as vertical rails or horizontal conductors.
  • Contacts are shown in their normal state, meaning the state when the actuating device is not operated and the coil is de-energized.
  • A normally open (NO) contact is open in its normal state and closes when actuated.
  • A normally closed (NC) contact is closed in its normal state and opens when actuated.
  • A coil represents a relay, contactor, solenoid, or internal PLC bit.
  • Contacts bearing the same reference as a coil are mechanically or logically associated with it.

The terms NO and NC describe contact behavior, not whether the input signal is logically 1 or 0 under every possible wiring arrangement. For example, an NC emergency-stop contact is physically closed during healthy operation, allowing current to reach a safety relay. Pressing the button opens the circuit.

A conventional motor-start circuit commonly contains a stop button, a start button, a contactor coil, and an auxiliary holding contact. The stop contact is usually NC and the start contact NO. The contactor's auxiliary NO contact is connected in parallel with the start button. Pressing Start energizes the coil; the auxiliary contact then maintains the circuit after Start is released.

Schematic interpretation should also consider:

  • conductor identification and terminal numbering;
  • protective devices such as fuses and circuit breakers;
  • control-transformer or power-supply boundaries;
  • overload relay contacts;
  • grounding and protective bonding;
  • wire-to-wire junctions versus crossing conductors;
  • the difference between a functional diagram and a wiring diagram.

A wiring diagram answers “where is the component connected?” A functional schematic answers “under what conditions does the component operate?” Both are needed during installation and troubleshooting.

3. Boolean Algebra and Logic Operations

Boolean algebra operates on variables that have two values, usually 0 and 1. The three basic operations are AND, OR, and NOT.

3.1 AND, OR, and NOT

The AND operation is written Y = A·B or Y = AB. It produces 1 only when both inputs are 1. In relay logic, series contacts represent AND.

The OR operation is written Y = A + B. It produces 1 when at least one input is 1. In relay logic, parallel contacts represent OR.

The NOT operation is written Y = ¬A or Y = A̅. It reverses the state. An NC logical condition is often used to represent NOT, although the physical interpretation depends on the input circuit.

OperationExpressionOutput is 1 when
ANDY = A·BA and B are both 1
ORY = A + BA or B, or both, are 1
NOTY = ¬AA is 0
NANDY = ¬(A·B)A and B are not both 1
NORY = ¬(A+B)A and B are both 0
XORY:Y = A⊕Bexactly one input is 1

The notation in the XOR row is intended as Y = A⊕B.

3.2 Fundamental Laws

Important Boolean identities include:

A + 0 = A,     A·1 = A
A + 1 = 1,     A·0 = 0
A + A = A,     A·A = A
A + ¬A = 1,    A·¬A = 0
¬(A·B) = ¬A + ¬B
¬(A+B) = ¬A·¬B

The final two are De Morgan's laws. They are especially useful when converting between NO and NC logic or between energized and de-energized interpretations.

The distributive laws are:

A·(B+C) = A·B + A·C
A + B·C = (A+B)·(A+C)

Boolean simplification can reduce the number of PLC instructions, relay contacts, wiring points, and possible failure locations. However, a mathematically minimal expression is not always the safest physical implementation. A deliberately redundant safety circuit may be preferable to a minimal control circuit.

3.3 Truth Tables

A truth table lists every possible input combination. For two inputs there are 2² = 4 combinations; for n binary inputs there are 2ⁿ combinations.

For the function Y = A·B + C, the output is 1 if both A and B are 1, or if C is 1.

ABCA·BY = A·B + C
00000
00101
01000
01101
10000
10101
11011
11111

Truth tables are valuable for requirements analysis, testing, and safety review. They expose cases that may be overlooked in a narrative description.

4. Number Systems in Automation

PLC data is stored as binary, although engineers frequently display it in decimal or hexadecimal.

A binary number uses powers of 2. For example:

(101101)₂ = 1·2⁵ + 0·2⁴ + 1·2³ + 1·2² + 0·2¹ + 1·2⁰ = (45)₁₀

Hexadecimal uses sixteen symbols: 0–9 and A–F. Each hexadecimal digit represents four binary bits. Thus:

(2D)₁₆ = 2·16¹ + 13·16⁰ = (45)₁₀

The subscript identifies the number base. Decimal-to-binary conversion can be performed by repeated division by 2, recording remainders from least significant to most significant. Binary-to-decimal conversion uses the weighted-sum method shown above.

Number systems are important when interpreting input registers, output words, diagnostic codes, communication frames, and bit masks. A technician who mistakes hexadecimal 10 for decimal 10 will obtain an incorrect value: hexadecimal 10 equals decimal 16.

Signed integers commonly use two's-complement representation. For an n-bit word, the representable range is:

−2ⁿ⁻¹ ≤ x ≤ 2ⁿ⁻¹ − 1

This range applies to standard two's-complement signed integers and excludes representations reserved for other data types. An 8-bit signed value therefore ranges from −128 to +127.

5. Combinational Logic

A combinational circuit has outputs determined only by current inputs. It has no memory. Examples include permissive logic, alarm decoding, selection circuits, and arithmetic comparison.

Consider a pump output that may run when the operator requests operation and both a tank-level permissive and an overload-health signal are true:

Pump = StartRequest·HighLevelPermissive·¬OverloadTrip

The equation assumes that all variables are represented in positive logic: a healthy overload is 1 and an overload trip is 1 before inversion. If the overload input is wired as an NC healthy contact, the PLC input may already be 1 during healthy operation, and the program expression must reflect the actual signal convention.

Combinational design follows a disciplined sequence:

  1. Define each input in physical and logical terms.
  2. Define the required output behavior.
  3. Write a truth table or Boolean expression.
  4. Simplify only where simplification does not remove a required safety condition.
  5. Test normal, abnormal, startup, shutdown, and sensor-failure states.

6. Sequential Logic, Memory, and PLC Scan Behavior

A sequential circuit depends on present inputs and previous state. A memory element is required. Relay self-holding circuits, set/reset coils, counters, timers, and state machines are sequential systems.

A simple motor command can be represented as:

Runₜ₊₁ = (Startₜ + Runₜ)·StopHealthyₜ·SafetyHealthyₜ

The subscript t denotes the current evaluation and t+1 the next stored state. This equation assumes a discrete scan or update process, a maintained memory bit, and a reset-dominant arrangement in which an unhealthy stop or safety condition clears the run state.

A PLC generally performs the following cycle:

  1. Read or refresh input data.
  2. Execute the user program in its defined order.
  3. Update outputs.
  4. Perform diagnostics and communications, depending on the controller architecture.

The exact behavior varies by PLC manufacturer. Some inputs are updated asynchronously or through immediate instructions, and safety PLCs use specialized execution and diagnostics. Therefore, timing-sensitive designs must be verified against the controller's documentation.

Latching

A latch allows a momentary command to produce a maintained output. In ladder logic, a holding contact may be placed in parallel with the Start contact. In PLC software, a seal-in rung or set/reset instructions may be used.

A robust latch must define:

  • what starts the state;
  • what stops or resets the state;
  • what happens after power restoration;
  • whether a fault has priority over a start request;
  • whether an operator must acknowledge the fault.

Automatic restart after power loss is hazardous for many machines. A non-retentive run command that requires a new Start action is often safer, but the correct design depends on the risk assessment and applicable machinery standards.

Set/Reset Priority

If both Set and Reset become true simultaneously, the implementation must specify priority. For a safety-related stop, reset-dominant behavior is generally preferred: a reset or trip condition must prevent the output from remaining active. The exact PLC instruction semantics must be checked, because different programming environments implement set/reset ordering differently.

7. Interlocking and Permissive Design

An interlock prevents mutually incompatible actions. A common example is a reversing motor with Forward and Reverse contactors. The Forward coil must not energize when Reverse is energized, and vice versa.

A conceptual expression is:

Forward = ForwardRequest·¬ReverseActive·SafetyHealthy
Reverse = ReverseRequest·¬ForwardActive·SafetyHealthy

Electrical interlocking uses an NC auxiliary contact of each contactor in series with the opposing coil. Mechanical interlocking adds a physical mechanism that prevents both contactors from closing even if electrical logic fails. For high-energy equipment, both forms may be required.

A permissive is a condition that must be true before an action is allowed. Examples include:

  • guard closed;
  • lubrication pressure adequate;
  • tank level above a pump-protection minimum;
  • valve in the correct position;
  • drive fault absent;
  • downstream equipment ready.

A permissive is different from a command. The operator may request a motor to run, but the motor should run only when all permissives are satisfied.

A trip is a condition that forces an operation to stop or prevents it from continuing. Trips should normally be latched when a hazardous or damaging condition requires investigation. Alarm, trip, and permissive signals should be clearly distinguished in documentation.

8. Fail-Safe Principles

Fail-safe design attempts to place the system in a safer state when power, wiring, hardware, or communication fails. It does not mean that every failure becomes harmless; rather, foreseeable failures are considered and controlled.

Important principles include:

  • Use de-energization to trip where practical. A broken wire in an NC healthy circuit then appears as a fault.
  • Design emergency-stop circuits to remove hazardous motion, not merely to send a software message.
  • Do not rely on a standard PLC alone for functions requiring a safety-rated control system.
  • Use monitored safety relays or safety PLCs when required by the risk assessment.
  • Prevent automatic restart after emergency stop, guard opening, or power restoration unless specifically justified.
  • Separate safety functions from ordinary control functions while permitting diagnostic status to be reported.
  • Consider welded contacts, stuck inputs, short circuits, loss of supply, and bypassed devices.

Fail-safe logic has limitations. An NC circuit may detect an open wire, but it may not detect a short circuit that bypasses the device. Dual-channel circuits, discrepancy monitoring, pulse testing, and certified safety components may be necessary.

Safety design must follow the legal and technical requirements applicable to the jurisdiction and machine. Commonly referenced frameworks include ISO 12100 for machinery risk assessment, ISO 13849 for safety-related control systems, IEC 62061 for machinery functional safety, and IEC 60204-1 for electrical equipment of machines. The applicable edition and local adoption must be verified by the responsible organization; standards are not a substitute for a documented risk assessment.

9. Relay Logic and Ladder Logic

Relay logic implements Boolean operations with physical contacts and coils. PLC ladder logic preserves the visual structure of relay circuits but executes it in software. A series path commonly represents AND, parallel branches represent OR, and normally closed instructions represent an inverted condition.

The correspondence is useful but not perfect. A physical relay has coil pickup and dropout times, contact bounce, electrical ratings, and mechanical wear. A PLC instruction is an evaluated software condition, although its input devices and output modules still have physical delays and failure modes.

Ladder programs should use meaningful tag names rather than unexplained addresses. For example, Guard_Closed, EStop_Healthy, and Conveyor_Run_Command communicate intent better than I0.3, I0.4, and Q0.1. Comments should describe the engineering reason for an interlock, not merely repeat the instruction name.

10. Worked Design Example: Conveyor Transfer Cell

Background

Consider an illustrative conveyor cell that transfers boxes to a downstream machine. The conveyor has a Start push button, a Stop push button, a guard switch, a motor overload contact, an emergency-stop safety relay, and a downstream-ready signal.

Requirements

The conveyor may run only when:

  1. the operator has requested running;
  2. the guard is closed;
  3. the emergency-stop circuit is healthy;
  4. the overload has not tripped;
  5. the downstream machine is ready.

A Start button should latch the run command. Stop, guard opening, emergency stop, overload trip, or loss of downstream readiness must remove the command. After power restoration, the conveyor must remain stopped until Start is pressed again.

Signal Definitions

Let:

  • S = Start pressed;
  • P = Stop circuit healthy;
  • G = guard closed and healthy;
  • E = emergency-stop safety relay healthy;
  • O = overload healthy;
  • D = downstream ready;
  • R = stored conveyor run command.

If Stop is represented by a healthy NC contact, P = 1 means the circuit is healthy. Similarly, O = 1 means no overload trip. The next-state relationship is:

Rₜ₊₁ = (Sₜ + Rₜ)·Pₜ·Gₜ·Eₜ·Oₜ·Dₜ

This is a functional model. A real safety implementation may remove motor energy through a safety contactor or drive-safe-torque-off circuit rather than relying on the ordinary PLC output.

Analysis

The term (S + R) provides start-or-hold behavior. The product of the five healthy conditions forms the permissive chain. If any condition becomes 0, the next run state becomes 0. Because Start is momentary and R is initially 0 after power-up, the system does not start automatically.

A commissioning test should include:

  • Start with every permissive healthy;
  • Start with each permissive individually false;
  • Stop while running;
  • open the guard while running;
  • simulate overload trip;
  • remove downstream-ready;
  • remove control power and restore it;
  • test a broken wire in each healthy circuit;
  • verify that reset does not itself create a run command.

Outcome and Learning Points

The design separates command, permissive, memory, and safety functions. It also demonstrates why the phrase “the motor does not start” is insufficient for troubleshooting: the engineer must determine whether the cause is a missing command, an unsatisfied permissive, a latched trip, an output fault, or a power-circuit problem.

11. Troubleshooting and Professional Practice

Troubleshooting should proceed from evidence rather than random component replacement. A practical sequence is:

  1. Confirm the reported symptom and operating mode.
  2. Check safety status and stored diagnostic messages.
  3. Trace the power path and control supply.
  4. Verify input states at the device and at the PLC terminal.
  5. Follow the logic from command through permissives to output.
  6. Verify the output module, interposing relay, contactor, and load.
  7. Record the root cause and corrective action.

Electrical measurements must use suitable instruments and safe working procedures. A voltage reading without a valid reference can be misleading. Continuity testing on energized circuits is unsafe and may damage equipment. Lockout/tagout, arc-flash procedures, appropriate personal protective equipment, and authorization are essential.

Documentation is part of engineering quality. Updated schematics, I/O lists, PLC comments, revision histories, test records, and safety-validation records reduce future downtime and prevent unsafe assumptions.

12. Limitations and Contemporary Developments

Relay circuits remain valuable because they are transparent, deterministic, and independent of software configuration. They become difficult to expand when the number of conditions grows. PLCs provide flexibility, diagnostics, data handling, networking, and easier modification, but introduce software-management, cybersecurity, configuration, and lifecycle risks.

Modern systems increasingly combine conventional PLC control with safety PLCs, distributed I/O, industrial Ethernet, condition monitoring, and digital twins. Artificial intelligence may assist anomaly detection or predictive maintenance, but an AI model should not replace deterministic safety interlocks unless it is part of an appropriately validated and certified safety architecture. A model's uncertainty, training-data limitations, and susceptibility to sensor faults must be considered.

Cybersecurity is also a control concern. Unauthorized logic changes, compromised engineering workstations, or manipulated sensor data can create physical hazards. Role-based access, signed backups, network segmentation, change control, and incident-response procedures should supplement electrical protection.

Chapter Summary

Electrical automation converts physical conditions and operator commands into logical decisions that control machines. Schematics communicate connections and normal device states; Boolean algebra provides a formal language for those decisions. AND corresponds commonly to series conditions, OR to parallel alternatives, and NOT to inversion, but physical signal conventions must always be verified.

Binary and hexadecimal systems are essential for interpreting PLC data. Combinational logic depends only on current inputs, whereas sequential logic uses memory and previous state. Latching creates maintained commands, while interlocking prevents incompatible operations. Permissives define conditions under which an operation is allowed, and trips force a stop when damaging or hazardous conditions occur.

Fail-safe design uses risk-based engineering, de-energized-to-trip arrangements where appropriate, monitored safety devices, and prevention of unintended restart. PLC ladder logic resembles relay logic but differs in timing, diagnostics, and failure modes. Effective designs are documented, tested under normal and abnormal conditions, and implemented in accordance with applicable safety standards and workplace procedures.

Key Terms

Boolean algebra: Algebra of variables restricted to two logical values.

Combinational logic: Logic whose output depends only on present inputs.

Contact: An electrical switching element that opens or closes a circuit.

De Morgan's laws: Boolean identities relating inversion of AND and OR operations.

Fail-safe: Design approach intended to move equipment toward a safer state after specified failures.

Hexadecimal: Base-16 number system using 0–9 and A–F.

Interlock: Electrical, mechanical, or software arrangement that prevents incompatible actions.

Ladder logic: PLC programming language based on relay-control representation.

Latch: Memory function that maintains a state after a momentary initiating signal ends.

Normally closed: Contact closed in its normal, unactuated state.

Normally open: Contact open in its normal, unactuated state.

Permissive: Condition that must be true before an operation is allowed.

PLC scan: Repeated process of reading inputs, executing logic, and updating outputs.

Sequential logic: Logic whose output depends on current inputs and stored previous state.

Set/reset priority: Rule determining which command dominates when set and reset occur together.

Truth table: Table listing outputs for all relevant combinations of binary inputs.

Trip: Condition that forces or requires an operation to stop.

Two's complement: Common binary representation of signed integers.

Review Questions

Short Answer Questions

  1. What is the difference between a normally open and a normally closed contact?
  2. Why are control circuits commonly separated from motor power circuits?
  3. State De Morgan's two laws.
  4. What distinguishes combinational logic from sequential logic?
  5. What is the purpose of an interlock?

Long Answer Questions

  1. Explain how a relay self-holding motor circuit works, including the roles of Stop, Start, and the auxiliary contact.
  2. Describe the PLC scan cycle and discuss why scan behavior matters in sequential control.
  3. Explain the difference between a command, permissive, alarm, and trip in an industrial control system.
  4. Discuss fail-safe design principles for an emergency-stop and guard-monitoring system.
  5. Compare relay logic and PLC ladder logic in terms of flexibility, diagnostics, failure modes, and maintenance.

Analytical / Application Questions

  1. Develop a Boolean expression and truth table for a pump that may run when either of two start requests is present, provided that a low-level trip is absent and a maintenance selector is not active.
  2. A reversing motor occasionally energizes both direction commands during a fast changeover. Analyze possible logical and physical causes and propose electrical, mechanical, and software interlocks.
  3. Design a test plan for the conveyor transfer cell described in this chapter. Include normal operation, each permissive failure, power restoration, broken-wire behavior, and emergency-stop operation.

Multiple Choice Questions with Answers

Question 1

In relay logic, contacts connected in series most directly represent which Boolean operation?

A. AND

B. OR

C. XOR

D. NOT

Correct Answer: A. AND

Question 2

What is the decimal value of (101101)₂?

A. 35

B. cuar?

C. 45

D. 53

Correct Answer: C. 45

Question 3

Which condition characterizes sequential logic?

A. Its output depends only on current inputs.

B. It requires no stored state.

C. Its output can depend on previous state.

D. It can use only analog signals.

Correct Answer: C. Its output can depend on previous state.

Question 4

What is the main purpose of a holding contact in a motor-start circuit?

A. To reduce motor voltage

B. To maintain the run command after Start is released

C. To reverse motor rotation

D. To measure overload current

Correct Answer: B. To maintain the run command after Start is released

Question 5

Which Boolean expression is De Morgan's equivalent of ¬(A·B)?

A. ¬A·¬B

B. ¬A + ¬B

C. A + B

D. A·B

Correct Answer: B. ¬A + ¬B

Question 6

A hexadecimal digit represents how many binary bits?

A. 2

B. 4

C. 8

D. 16

Correct Answer: B. 4

Question 7

Which arrangement prevents a Forward contactor from energizing while Reverse is active?

A. A Forward NO auxiliary contact in series with Reverse

B. A Reverse NC auxiliary contact in series with Forward

C. A fuse connected across both coils

D. A lamp connected in parallel with Forward

Correct Answer: B. A Reverse NC auxiliary contact in series with Forward

Question 8

In a positive-logic healthy-signal design, what does O = 1 represent when O is defined as overload healthy?

A. An overload trip is present

B. The overload circuit is healthy

C. The motor is rotating backward

D. The PLC is unpowered

Correct Answer: B. The overload circuit is healthy

Question 9

Why is automatic restart after power restoration often avoided?

A. It always damages the PLC memory.

B. It can create unexpected machine motion.

C. It prevents all diagnostics.

D. It converts binary data to hexadecimal.

Correct Answer: B. It can create unexpected machine motion.

Question 10

For an 8-bit two's-complement signed integer, what is the representable range?

A. 0 to 255

B. −127 to 127

C. −128 to 127

D. −255 to 255

Correct Answer: C. −128 to 127

Industrial Automation & PLC
Chapter 2 of 15