Sitemap

I Learned PLC Fundamentals From Zero — Here’s How Industrial Machines Actually Think

7 min read3 hours ago

--

Press enter or click to view image in full size
Photo by Raymond Sime on Unsplash

I’ve recently started learning Programmable Logic Controllers (PLCs) because I want to explore industrial automation and eventually specialize in machine fault diagnosis.

I decided to approach the subject differently.

Instead of memorizing technical definitions, I wanted to understand what actually happens inside an industrial machine. What makes it start? What makes it stop? How does it know when something is wrong?

I used ChatGPT as an interactive tutor throughout my first learning session. I asked it to explain concepts, challenged its explanations with unusual scenarios, and tested myself using multiple-choice questions.

Here’s what I learned, step by step.

1. What is a PLC?

Let’s start with the simplest definition.

A Programmable Logic Controller (PLC) is an industrial computer designed to control machines and automated processes.

Unlike an ordinary computer, a PLC is built to operate in industrial environments and continuously monitor inputs, execute instructions and control outputs.

Its basic working principle is:

Inputs → CPU → Outputs

Let’s understand each part.

  • Inputs: Information received from sensors, switches and pushbuttons.
  • CPU: The processor that executes the control program.
  • Outputs: Signals sent to devices such as motors, pumps, lights and valves.

Think of the CPU as the decision-maker.

It receives information, evaluates the programmed conditions and decides what should happen next.

2. Let’s build an example: An automated water tank

Imagine a water tank with a sensor and an electric pump.

We want the system to work automatically:

  • When the tank is empty, the pump should start.
  • When the tank is full, the pump should stop.

How would a PLC handle this?

First, the water-level sensor sends information to a PLC input.

For our simplified example, let’s use two digital states:

Tank conditionSensor signalWater level low1Tank full0

The PLC receives the signal and executes its program.

If the program says to run the pump when the sensor signal is 1, the PLC activates its output.

That output can control a contactor, which switches power to the pump.

When the sensor changes to 0, the programmed start condition is no longer satisfied, so the PLC turns the pump output OFF.

An important distinction: the PLC normally doesn’t directly supply the power needed by a large industrial motor. It controls suitable switching equipment, such as a contactor, which handles the motor’s power circuit.

That’s the basic relationship between a sensor, a PLC and a machine.

3. Does stopping a machine mean shutting down the PLC?

This was one of my first questions.

Imagine the tank becomes full and the pump stops.

Does the PLC also shut down?

No.

The pump and the PLC are separate devices with different functions.

When the pump stops:

  • The pump output becomes OFF.
  • The PLC remains powered ON.
  • The CPU continues executing its program.
  • The PLC keeps monitoring the sensors.

This is important because industrial machines often stop and restart without shutting down their control systems.

A machine being stopped does not necessarily mean its controller is powered OFF.

4. Understanding NO and NC contacts

Now let’s move to something you’ll encounter frequently in electrical control circuits.

NO and NC describe two different types of electrical contact behaviour.

Normally Open (NO)

An NO contact is OPEN in its normal, unpressed state.

When you press a momentary NO pushbutton, the contact CLOSES, allowing the electrical connection to be completed.

When you release the button, the contact OPENS again.

A common example is a green START pushbutton.

Think of it this way:

  • Not pressed: The electrical connection is broken.
  • Pressed: The electrical connection is completed.
  • Released: The electrical connection is broken again.

When connected correctly, pressing this button can send an ON signal to a PLC input.

Normally Closed (NC)

An NC contact behaves in the opposite way.

Its contact is CLOSED in its normal, unpressed state.

When you press it, the contact OPENS.

When you release it, the contact CLOSES again.

A common example is a red STOP pushbutton.

Think of it this way:

  • Not pressed: The electrical connection is complete.
  • Pressed: The electrical connection is broken.
  • Released: The electrical connection is complete again.

When connected correctly, pressing this button can remove the signal from a PLC input.

NO vs NC: What’s the difference?

BehaviourNONCNormal stateOpenClosedWhen pressedClosesOpensWhen releasedOpensClosesCommon exampleSTARTSTOP

Get Ubaid Ur Rehman’s stories in your inbox

Join Medium for free to get updates from this writer.

One interesting detail: a single industrial pushbutton can contain both NO and NC contact blocks.

Also, remember that NO and NC describe the physical contact’s normal state. In PLC Ladder Logic, the corresponding instructions evaluate the logical state of an input bit. These are related concepts, but they aren’t identical.

5. Why are NC contacts useful? What if someone cuts the wire?

This was probably the most interesting question I asked during the lesson.

Imagine a machine has an NC STOP button.

During normal operation, its contact is closed, allowing the control circuit to remain complete.

Now imagine someone accidentally cuts the wire.

What happens?

The circuit becomes open.

In a typical 24V DC PLC input arrangement, the PLC input loses its signal.

If the control program requires that signal to remain ON for operation, the PLC can detect the missing signal and stop the machine.

This is connected to an important engineering principle called fail-safe design.

The idea is to design a system so that certain failures cause it to move toward a safer state.

For example:

SituationWhat happensNormal operationNC contact remains closedSTOP button pressedContact opensWire accidentally brokenCircuit opensSignal lostPLC can detect the condition

Why is this useful?

Because the system doesn’t necessarily need someone to press STOP to detect a problem. A broken wire can also interrupt the signal.

However, this isn’t a guarantee against every possible fault. Actual emergency-stop functions require appropriately designed safety-rated circuits, such as safety relays or safety PLCs. An ordinary PLC input alone is not sufficient.

6. How does a PLC process information continuously?

Another fundamental concept is the PLC scan cycle.

A PLC doesn’t simply receive one signal and wait forever.

It repeatedly performs a sequence of operations:

  1. Reads its inputs.
  2. Executes the control program.
  3. Updates its outputs.
  4. Repeats the process.

This repeated process is called the PLC scan cycle.

For example, imagine a sensor detects that a tank is full.

During the next input-reading stage, the PLC reads the sensor’s state. It then evaluates the program and updates the pump output accordingly.

This process repeats continuously while the PLC is operating.

Understanding the scan cycle is important because troubleshooting often involves checking what the PLC is actually reading, what its program is deciding and what outputs it is commanding.

7. How I used ChatGPT to learn faster

I didn’t use ChatGPT simply to generate notes.

I used it as an interactive tutor.

My learning method involved four steps:

Step 1 — Learn a concept

I asked ChatGPT to explain PLC fundamentals from zero, using simple examples such as water tanks, pumps and pushbuttons.

Step 2 — Challenge the explanation

Whenever something was unclear, I asked another question.

For example, instead of accepting the explanation of an NC contact, I asked what would happen if its wire was accidentally cut.

This helped me connect electrical behaviour with machine behaviour.

Step 3 — Practise with MCQs

After learning a concept, I asked ChatGPT to test me with multiple-choice questions.

I had to choose an answer before seeing the explanation.

This made the learning process active rather than passive.

Step 4 — Learn through failure scenarios

I found that asking what could go wrong was especially useful.

A broken wire, a missing sensor signal or an unexpected input state can reveal much more about a control system than simply studying its normal operation.

My learning loop became:

Learn → Question → Test → Correct → Apply.

AI helped me move between explanations and practical examples much faster. However, I still need simulations, real equipment and supervised practical experience to verify what I learn.

AI can accelerate understanding, but it cannot replace hands-on engineering skills.

8. What’s next?

These are only the fundamentals. I haven’t yet programmed a real PLC or independently diagnosed an industrial machine.

My next topics are:

  • Ladder Logic and logical conditions.
  • Relays and contactors.
  • Motor-starting circuits.
  • Self-holding (latching) logic.
  • Industrial sensors and actuators.
  • PLC monitoring and fault diagnosis.

My longer-term goal is to combine industrial automation with AI-assisted fault diagnosis.

I want to explore how AI agents can analyse PLC alarms, diagnostic logs, electrical diagrams and maintenance records to help technicians investigate possible root causes.

But first, I need to understand the underlying technology.

Final takeaway

If you’re also starting with PLCs, don’t rush straight into programming.

Understand the relationship between inputs, outputs, electrical contacts and control logic first.

Learn what happens when a machine operates normally, then ask what happens when something goes wrong.

Because in industrial automation, knowing how to start a machine is useful.

Knowing why it stopped is what makes you a troubleshooter.

--

--

Ubaid Ur Rehman
Ubaid Ur Rehman

Written by Ubaid Ur Rehman

18, Karachi. I build and break production systems. Founder of Hidayah OS. EC-Council Hall of Fame (9 vulns, 3 critical). In Generative AI, T3CH & OSINT Team.