PLC Basics
Introduction to PLC Basics
PLC means Programmable Logic Controller. It is an industrial computer used to control machines, equipment, process systems, motors, valves, pumps, alarms, and production lines.
A PLC receives signals from field devices, processes those signals according to a programmed logic, and sends commands to output devices. It is widely used in factories, oil and gas facilities, power plants, water treatment plants, packaging lines, building systems, marine systems, and many other industrial environments.
A PLC is designed to work in harsh industrial conditions where normal computers may not be suitable. It can operate around electrical noise, vibration, heat, panel environments, and continuous production demands when properly selected, installed, and maintained.
Why PLCs Are Important
PLCs are important because they allow machines and industrial processes to operate automatically, safely, and consistently.
PLCs help to:
- Start and stop machines automatically.
- Control pumps, motors, valves, and actuators.
- Monitor pressure, temperature, flow, level, and position.
- Receive signals from sensors and switches.
- Send commands to field devices.
- Run interlocks and protection logic.
- Control production sequences.
- Reduce manual operation.
- Improve safety and reliability.
- Support troubleshooting and maintenance.
- Communicate with HMI, SCADA, DCS, drives, and other systems.
Without PLCs, many industrial systems would depend heavily on manual control or complex relay wiring.
Basic PLC Control Idea
A PLC works using a simple idea:
Input → Logic → Output
| Stage | Meaning | Example |
|---|---|---|
| Input | Signal received from field device | Start button, level switch, pressure transmitter |
| Logic | Programmed decision inside the PLC | If level is low, start pump |
| Output | Command sent to field device | Pump motor starts |
Example:
A tank has a low-level switch and a pump.
- The low-level switch sends an input to the PLC.
- The PLC program checks the input.
- If the level is low, the PLC sends an output to start the pump.
- When the tank reaches high level, the PLC stops the pump.
Main Parts of a PLC System
A PLC system is made up of several important parts.
| Part | Function |
|---|---|
| Power supply | Provides power to the PLC system |
| CPU | Processes the program and makes decisions |
| Input modules | Receive signals from field devices |
| Output modules | Send commands to field devices |
| Communication module | Allows PLC to communicate with other systems |
| Programming device | Used to create, download, and monitor the program |
| Backplane / rack | Connects PLC modules together |
| Memory | Stores the program, data, and settings |
| Field devices | Sensors, switches, actuators, valves, motors, and instruments |
Each part must be correctly selected, wired, configured, and maintained.
PLC Power Supply
The PLC power supply provides the correct voltage needed by the PLC processor and modules.
Common PLC power supplies may use:
- 24 V DC
- 110 V AC
- 230 V AC
The power supply may be built into the PLC or installed as a separate unit, depending on the PLC type.
A stable power supply is important because poor power can cause PLC faults, communication problems, input/output errors, or unexpected shutdowns.
PLC CPU
The CPU is the brain of the PLC. It reads input signals, executes the program, updates outputs, manages memory, communicates with other devices, and monitors system status.
The CPU usually contains:
- Processor
- Memory
- Communication ports
- Status indicators
- Diagnostic functions
- Program execution system
If the CPU fails, the PLC system may stop running or enter fault mode.
PLC Memory
PLC memory stores the control program, input status, output status, timer values, counter values, data registers, configuration settings, and fault information.
Common memory areas may include:
| Memory Area | Purpose |
|---|---|
| Input image | Stores input status read by the PLC |
| Output image | Stores output status to be sent to devices |
| Program memory | Stores the PLC logic |
| Data memory | Stores values, setpoints, counters, and calculations |
| Retentive memory | Keeps selected values after power loss |
| Diagnostic memory | Stores fault and system information |
Memory names and structures differ between PLC brands, but the basic idea is similar.
Input Modules
Input modules allow the PLC to receive signals from field devices.
Input devices may include:
- Push buttons
- Selector switches
- Limit switches
- Proximity sensors
- Photoelectric sensors
- Pressure switches
- Level switches
- Flow switches
- Temperature switches
- Transmitters
- Emergency stop contacts
- Motor feedback contacts
- Valve position feedback
The input module converts field signals into signals the PLC can understand.
Digital Inputs
Digital inputs are on/off signals.
Examples:
- Start button pressed or not pressed
- Limit switch made or not made
- Pump running or stopped
- Valve open or closed
- Emergency stop activated or healthy
- Level switch high or normal
Digital inputs are commonly used for status, alarms, commands, and interlocks.
Analog Inputs
Analog inputs are continuously changing signals. They represent values such as pressure, temperature, flow, level, speed, or position.
Common analog input signals include:
- 4–20 mA
- 0–10 V
- 1–5 V
- RTD signal through a special module
- Thermocouple signal through a special module
Example:
A pressure transmitter sends a 4–20 mA signal to the PLC. The PLC converts it into an engineering value such as 0–10 bar.
Output Modules
Output modules allow the PLC to send commands to field devices.
Output devices may include:
- Relays
- Contactors
- Solenoid valves
- Motor starters
- Indicator lamps
- Alarms
- Control valves
- Actuators
- Variable frequency drives
- Heaters
- Sirens
- Beacons
The output module converts the PLC decision into a usable field signal.
Digital Outputs
Digital outputs are on/off commands.
Examples:
- Start pump
- Stop motor
- Open solenoid valve
- Turn on alarm lamp
- Energise relay
- Activate siren
- Start fan
- Close shutdown valve
Digital outputs are used where the field device needs a simple on/off command.
Analog Outputs
Analog outputs are continuously changing control signals.
Common analog output signals include:
- 4–20 mA
- 0–10 V
Examples:
- PLC sends 4–20 mA to a control valve positioner.
- PLC sends 0–10 V to a damper actuator.
- PLC sends speed reference to a variable frequency drive.
- PLC sends power command to a heater controller.
Analog outputs are used for modulating control, not simple on/off control.
PLC Input and Output Addressing
Every input and output connected to a PLC has an address. The address helps the PLC program identify which signal is being used.
Example:
| Device | Possible PLC Address | Meaning |
|---|---|---|
| Start push button | I0.0 | Digital input |
| Stop push button | I0.1 | Digital input |
| Motor contactor | Q0.0 | Digital output |
| Pressure transmitter | AI0 | Analog input |
| Control valve | AO0 | Analog output |
Address format depends on the PLC brand and programming software. Siemens, Allen-Bradley, Schneider, Omron, Delta, Mitsubishi, and other PLC brands may use different addressing styles.
PLC Scan Cycle
A PLC does not usually execute logic randomly. It follows a repeated operating cycle called the scan cycle.
A basic PLC scan cycle includes:
| Step | Function |
|---|---|
| Read inputs | PLC checks the status of input devices |
| Execute program | PLC runs the control logic |
| Update outputs | PLC sends commands to output devices |
| Communication and diagnostics | PLC communicates and checks system status |
The scan cycle happens repeatedly while the PLC is running. This allows the PLC to continuously monitor inputs and update outputs in real time. A typical PLC scan cycle involves reading inputs, executing logic, and updating outputs continuously.
Simple PLC Scan Cycle Example
A start button is connected to a PLC input. A motor contactor is connected to a PLC output.
During the scan cycle:
- The PLC reads the start button input.
- The PLC checks the program logic.
- If the start condition is true, the PLC turns on the motor output.
- The PLC repeats the cycle continuously.
If the start button changes state, the PLC detects it during the next input scan.
PLC Program
A PLC program is the set of instructions that tells the PLC what to do.
The program may include:
- Start and stop logic
- Interlocks
- Timers
- Counters
- Alarms
- Sequencing
- Motor control
- Valve control
- Analog scaling
- PID control
- Communication logic
- Safety-related logic, where designed and approved
PLC programs must be written carefully because a wrong instruction can cause equipment damage, unsafe operation, or production loss.
PLC Programming Languages
PLC programming can be done using different languages. The most common include:
| Language | Description |
|---|---|
| Ladder Diagram: LD | Graphical language that looks like relay logic |
| Function Block Diagram: FBD | Uses function blocks connected together |
| Structured Text: ST | Text-based language similar to programming code |
| Sequential Function Chart: SFC | Used for step-by-step sequences |
| Instruction List: IL | Older low-level language, less common in modern use |
Ladder diagram is one of the most common languages for beginners because it resembles electrical relay circuits.
Ladder Logic
Ladder logic is a graphical PLC programming language that looks similar to electrical relay wiring diagrams. It uses contacts, coils, branches, timers, counters, and function blocks to create control logic.
Siemens documentation explains that ladder logic uses normally open and normally closed contacts and coils linked together to form networks, and can also include branches, timers, counters, math, and move functions.
Ladder logic is popular because electricians and technicians can understand it more easily than many text-based programming languages.
Ladder Logic Structure
A ladder logic program looks like a ladder.
| Ladder Part | Meaning |
|---|---|
| Left rail | Power or logic start side |
| Right rail | Logic end side |
| Rung | One line of logic |
| Contact | Input condition or internal condition |
| Coil | Output or internal bit |
| Branch | Parallel logic path |
| Timer | Time-based instruction |
| Counter | Count-based instruction |
Each rung usually represents one control decision.
Normally Open Contact
A normally open contact is true when the related input or condition is active.
Example:
A start push button is normally open. When the operator presses it, the PLC input becomes true.
In ladder logic, a normally open contact is often used when an action should happen after a signal becomes active.
Normally Closed Contact
A normally closed contact is true when the related input or condition is not active.
Example:
A stop push button may be wired so that the circuit is healthy when the button is not pressed. When the stop button is pressed, the circuit opens and the PLC stops the motor.
Normally closed logic is often used for stop, trip, safety, fault, and permissive conditions.
Coil
A coil represents an output or internal bit controlled by the logic.
Examples:
- Motor output
- Pump command
- Valve open command
- Alarm bit
- Internal memory bit
- Run status
If the logic before the coil is true, the coil becomes active.
Simple Start/Stop Motor Logic
A simple motor control system may include:
- Start push button
- Stop push button
- Motor output
- Motor running feedback
- Overload trip
Basic logic:
- If the stop button is healthy,
- And the overload is healthy,
- And the start button is pressed,
- Then the PLC energises the motor output.
A seal-in or latch instruction may keep the motor running after the start button is released, until the stop button or fault condition breaks the logic.
Interlocks in PLC Logic
An interlock is a condition that must be satisfied before an action is allowed.
Examples:
- Pump cannot start unless suction valve is open.
- Heater cannot start unless flow is available.
- Compressor cannot start unless oil pressure is healthy.
- Conveyor cannot start unless guard is closed.
- Motor cannot start if overload is tripped.
Interlocks protect people, equipment, and process systems. They should not be bypassed without proper authorisation.
Permissives
A permissive is a condition that must be true before an action is allowed to start.
Example:
A pump start permissive may include:
- Power supply healthy
- Emergency stop healthy
- Suction valve open
- Discharge valve ready
- Tank level not low
- Motor overload healthy
- Control system healthy
If one permissive is missing, the PLC should prevent the pump from starting.
Trips
A trip is a condition that stops equipment automatically for protection.
Examples:
- Motor overload trip
- High-high pressure trip
- Low-low level trip
- High temperature trip
- Emergency stop trip
- Loss of air supply trip
- Flame failure trip
Trips are more serious than normal alarms because they usually cause shutdown action.
Timers
Timers are PLC instructions used to delay actions or measure time.
Common timer applications include:
- Start delay
- Stop delay
- Alarm delay
- Pump changeover delay
- Motor restart delay
- Valve travel timeout
- Purge timer
- Sequence timing
Example:
A fan must run for 10 seconds before a heater starts. The PLC uses a timer to delay the heater command.
Counters
Counters are PLC instructions used to count events.
Common counter applications include:
- Counting bottles on a production line
- Counting machine cycles
- Counting pump starts
- Counting parts produced
- Counting alarm occurrences
- Counting batches
Example:
A sensor detects products passing on a conveyor. The PLC counts each product and stops the conveyor when 100 products have passed.
Latching Logic
Latching logic keeps an output on after the original start condition is removed.
Example:
A start button is pressed briefly, but the motor continues running after the button is released. The motor remains on until a stop command, fault, or trip breaks the latch.
Latching is common in motor control, pump control, alarms, and sequence control.
PLC Communication
PLCs often communicate with other devices and systems.
Common communication connections include:
- HMI
- SCADA
- DCS
- Variable frequency drives
- Remote I/O
- Smart instruments
- Energy meters
- Motor control centres
- Other PLCs
- Network switches
- Industrial gateways
Common industrial communication protocols include Ethernet/IP, Modbus, Profinet, Profibus, DeviceNet, CANopen, and others depending on the equipment and plant design.
HMI and PLC
An HMI is a Human-Machine Interface. It allows operators to view and control the PLC system.
An HMI may show:
- Motor status
- Valve status
- Process values
- Alarms
- Setpoints
- Trends
- Start and stop buttons
- Manual and automatic controls
- Fault messages
- Maintenance information
The PLC performs the control logic, while the HMI gives operators a user-friendly way to interact with the system.
PLC and Field Instruments
PLCs work closely with instrumentation devices.
Examples:
| Instrument | PLC Signal |
|---|---|
| Pressure transmitter | Analog input |
| Level switch | Digital input |
| Temperature transmitter | Analog input |
| Flow meter | Analog input or pulse input |
| Control valve positioner | Analog output |
| Solenoid valve | Digital output |
| Motor status contact | Digital input |
| VFD speed reference | Analog output or communication |
Instrumentation technicians must understand how field signals connect to PLC I/O modules.
PLC Panels
A PLC panel is an enclosure that houses PLC equipment and related control components.
A PLC panel may contain:
- PLC CPU
- I/O modules
- Power supply
- Circuit breakers
- Fuses
- Relays
- Terminal blocks
- Network switches
- Cable trunking
- Earthing bar
- HMI
- Signal isolators
- Surge protection devices
- Communication modules
Good panel wiring improves reliability and makes troubleshooting easier.
PLC Panel Safety
PLC panels may contain dangerous voltages and control circuits. Work should be done carefully and only by authorised personnel.
Safety practices include:
- Follow permit and isolation procedures.
- Use Lockout/Tagout where required.
- Confirm voltage before touching conductors.
- Use insulated tools.
- Avoid loose wires and poor terminations.
- Keep panel doors closed when not working.
- Do not bypass protective devices.
- Do not leave tools inside panels.
- Keep panels clean and dry.
- Label wires and terminals properly.
- Report damaged components.
A PLC panel should not be treated as harmless just because the PLC control voltage may be 24 V DC. Other parts of the panel may carry higher voltage.
PLC Troubleshooting
PLC troubleshooting involves checking the field device, wiring, input/output module, PLC logic, power supply, communication, and process condition.
A logical troubleshooting method includes:
- Understand the fault description.
- Check the process condition.
- Check the HMI alarm or fault message.
- Confirm the instrument tag or device number.
- Check field device status.
- Check PLC input status.
- Check PLC output status.
- Check fuses and power supply.
- Check terminals and wiring.
- Check program logic status.
- Check interlocks and permissives.
- Check communication status.
- Document the fault and correction.
Do not assume the PLC is faulty first. Many PLC-related problems are caused by field devices, wiring, power supply, configuration, or process conditions.
Common PLC Faults
| Fault | Possible Cause |
|---|---|
| PLC not powering on | Power supply failure, blown fuse, wrong voltage |
| Input not changing | Bad sensor, broken wire, wrong wiring, faulty input module |
| Output not energising | Logic not true, blown fuse, faulty output module, interlock active |
| Motor not starting | Missing permissive, overload trip, contactor fault, output fault |
| HMI not communicating | Network fault, wrong IP address, cable issue |
| Analog value wrong | Scaling error, wiring fault, transmitter fault, wrong module setting |
| PLC in fault mode | Program error, hardware fault, communication error |
| Intermittent fault | Loose terminal, noise, poor power supply, moisture |
| Output stays on | Stuck relay, forced output, program logic issue |
| Alarm not clearing | Fault still active, reset condition missing, logic latch active |
A technician should check both the PLC logic and the field condition before replacing any component.
PLC Forcing
Forcing means manually overriding an input or output status in the PLC software.
Forcing can be useful during testing and commissioning, but it can be dangerous if used carelessly.
A forced output can start a motor, open a valve, stop equipment, bypass a condition, or create unsafe operation.
PLC forcing should only be done:
- By authorised personnel.
- With operations informed.
- Under approved procedure.
- When process impact is understood.
- With clear documentation.
- With forces removed after testing.
Never leave forces active after maintenance.
Manual and Automatic Control
Many PLC systems allow equipment to operate in manual or automatic mode.
| Mode | Meaning |
|---|---|
| Manual mode | Operator directly starts, stops, opens, closes, or adjusts equipment |
| Automatic mode | PLC controls equipment according to programmed logic |
Manual mode is useful during testing, maintenance, and local operation. Automatic mode is used for normal process operation.
Before changing modes, the technician must understand how the equipment will respond.
PLC Program Backup
A PLC program backup is a saved copy of the PLC program and configuration.
Backups are important because they help restore the system after:
- CPU failure
- Memory loss
- Wrong program change
- Equipment replacement
- Software corruption
- Unauthorised modification
- Commissioning issue
A backup should be clearly named, dated, and stored safely according to company procedure.
PLC Documentation
PLC documentation helps technicians understand the control system.
Important documents include:
- I/O list
- Wiring diagram
- Control panel drawing
- Cause and effect chart
- Logic description
- PLC program printout
- HMI screen list
- Network diagram
- Instrument loop diagram
- Cable schedule
- Alarm list
- Interlock list
- Maintenance records
Without proper documentation, troubleshooting becomes slower, riskier, and more confusing.
Cybersecurity Awareness
Modern PLCs may connect to networks, HMIs, SCADA systems, engineering laptops, and remote monitoring systems. This creates cybersecurity risks if systems are not protected.
Basic cybersecurity awareness includes:
- Do not connect unknown USB drives to engineering systems.
- Do not connect personal laptops without approval.
- Protect PLC programs and passwords.
- Use authorised engineering software only.
- Do not share control-system passwords.
- Report suspicious changes or network issues.
- Keep backups secure.
- Follow company cybersecurity procedure.
Siemens advises that protecting industrial systems requires a holistic, state-of-the-art security concept that is implemented and continuously maintained.
Real-Life Scenario
A pump fails to start from the HMI. The operator reports that the PLC is faulty. The technician checks the HMI and sees that the pump command is active, but the pump output is not energising.
The technician checks the PLC logic and finds that one permissive is missing: the suction valve open feedback is not active. Field inspection shows that the suction valve limit switch is faulty, so the PLC is correctly preventing the pump from starting.
The fault was not the PLC. The PLC was protecting the pump by following the programmed interlock.
Common Beginner Mistakes
Avoid these mistakes:
- Assuming every automation fault is a PLC fault.
- Ignoring field devices and wiring.
- Confusing input status with output status.
- Forgetting that interlocks can prevent equipment from starting.
- Changing logic without approval.
- Forcing outputs without informing operations.
- Leaving forces active after testing.
- Not checking fuses and power supplies.
- Ignoring PLC fault lights.
- Confusing manual mode and automatic mode.
- Replacing modules without checking configuration.
- Failing to save a program backup before changes.
- Working inside a live panel without proper safety procedure.
What an Instrumentation Technician Should Never Do
An instrumentation technician should never:
- Modify PLC logic without authorisation.
- Force inputs or outputs without approval.
- Leave forced signals active after maintenance.
- Download a program without confirming it is the correct version.
- Work inside a PLC panel without following electrical safety procedures.
- Ignore interlocks and trips.
- Bypass safety logic casually.
- Connect unknown devices to a PLC network.
- Delete or overwrite PLC backups carelessly.
- Change I/O wiring without updating documentation.
- Blame the PLC before checking field signals and logic conditions.
Quick Recap
A PLC is an industrial controller used to monitor inputs, process programmed logic, and control outputs. It is made up of parts such as the power supply, CPU, input modules, output modules, communication modules, memory, and field devices. PLCs use digital and analog inputs and outputs to control machines and processes. The PLC scan cycle reads inputs, executes the program, updates outputs, and repeats continuously. Ladder logic is a common PLC programming language that uses contacts, coils, rungs, timers, counters, and branches. PLCs also communicate with HMIs, SCADA systems, drives, remote I/O, and other controllers. A professional technician must understand wiring, I/O addressing, interlocks, permissives, trips, troubleshooting, documentation, backups, and safety before working on PLC systems.