PLC basics: AND, OR, NOT and latching on the cylinder

By Tobias Schott  · 6-minute read · Updated November 2026

A PLC reads sensors and buttons, combines their signals according to fixed rules and switches valves and motors from them – and behind almost every conveyor system are the same three basic building blocks: AND, OR, NOT.

You encounter PLC basics as soon as a system does not do what it should. The sentence “it’s the control” comes up quickly. Anyone who knows how a controller thinks searches more specifically: does the signal arrive from the sensor? Is a release missing? Or is the logic itself wrong?

This article explains how a programmable logic controller works, what the basic operations mean and how latching controls a cylinder. It is not a programming guide, but the basic knowledge for everyone who works with systems. How to proceed systematically in the event of a fault is covered in the guide Conveyor system down: rectifying the fault.

What is a PLC?

A PLC, a programmable logic controller, is an industrial computer that processes input signals according to a stored program and generates output signals from them. In the past this was done by wired relays and contactors. Today the logic is in the program and can be changed without rewiring.

For small tasks with few inputs and outputs there are compact controllers, also called logic modules, for example for a door, a pump or a single cylinder. Large systems work with modular controllers to which hundreds of signals are connected. In German the PLC is called SPS (speicherprogrammierbare Steuerung).

Key facts

Input, program, output: the cycle

A PLC works in a fixed loop and decides afresh in every pass which outputs are switched on.

Schematic drawing: cycle of a programmable logic controller of reading inputs, running the program and setting outputs, on the left a sensor as input and a cylinder as output
Read, compute, switch – afresh in every cycle. The PLC only sees what arrives at its inputs. Graphic: Omega Mounting

At the start of each cycle it reads in all inputs and stores their state: button pressed or not, sensor occupied or free. Then it runs the program from top to bottom and calculates for each output whether it should be on or off. At the end it writes the result to the outputs. Then the next cycle begins.

Because this happens so quickly, the controller appears to react continuously and simultaneously. What matters for troubleshooting: the PLC only sees what arrives at its inputs. For it, a misaligned sensor is a missing signal, not “almost occupied”. Almost every controller shows the state of each input and output with an LED.

AND, OR, NOT: the three basic operations

Explanatory graphic: PLC basics – the operations AND, OR and NOT with rule, example and truth table
Three building blocks are enough for almost any basic logic: AND requires everything, OR needs one, NOT inverts. Graphic: Omega Mounting

With three building blocks almost any basic logic can be built – and every everyday condition can be phrased as “if …, then …”.

In the ladder diagram these operations look like a circuit diagram: contacts in series are an AND, contacts in parallel an OR, a normally closed contact a NOT. In the function block diagram the same operations appear as boxes with “&”, “≥1” and a small circle for inversion.

Ladder diagram with three rungs: three contacts in series as AND, two parallel contacts as OR and a normally closed contact as NOT, each with a coil as output
In series is AND, in parallel is OR, the crossed contact is NOT. Graphic: Omega Mounting
Input AInput BA AND BA OR BNOT A
Off.Off.Off.Off.On.
On.Off.Off.On.Off.
Off.On.Off.On.On.
On.On.On.On.Off.

Latching, timers and counters: using a cylinder as an example

Latching remembers a short button press until a stop comes – it is the most important building block after the three basic operations.

Ladder diagram of a latch with start button, parallel latching contact, normally closed stop and output, below it the timing diagram: the output stays on after the short start pulse until stop is pressed
Start sets the output, its own contact holds it, stop resets it – latching remembers the button press. Graphic: Omega Mounting

A button only delivers a signal for as long as it is pressed. So that a belt keeps running after release, the output holds itself via its own contact: start sets it, it stays on until stop resets it. The stop has priority, and it is connected as a normally closed contact. If a cable breaks, the signal drops out – and the system stops instead of continuing to run.

A double-acting cylinder with two end-position switches shows the interaction:

Whether a valve with spring or a pulse valve is used for this changes the logic: one needs a continuous signal, the other only a pulse per direction. That is why valve and program always belong together.

Where the logic ends: safety

Emergency stop, guard doors and safety light curtains do not run via the normal logic but via separate safety technology.

Schematic drawing: emergency stop, guard door switch and safety light curtain lead to a safety relay that switches off the drive via two contactors; the standard PLC only receives a signal
Emergency stop, guard door and light curtain run via separate, self-monitoring safety technology – the standard PLC only receives a signal. Graphic: Omega Mounting

A standard PLC is not built to protect people. Safety functions run via safety relays or safety controllers that monitor themselves and are assessed according to ISO 13849. Anyone working on a system should know this limit: a safety function is never bypassed and never “quickly” circumvented in the program.

What we pay attention to

We do not reprogram controllers – we make sure the right signals arrive.

Where we use it

We deal with controllers every day in installation and maintenance, even though we do not program them. During the installation of vehicle restraint systems in a logistics centre near Leipzig 32 control desks and control cabinets belonged to 32 loading bays, which our fitters installed and wired. During the extension of a parcel sorting system at Frankfurt Airport 32 emergency stop buttons and numerous sensors were integrated into the existing safety chain. Both are part of our work in Logistics.

Pre-assembled emergency stop housings with cable glands before installation
Every button and every sensor is an input of the controller – properly prepared, labelled and integrated so that the logic gets the right signals.

More technology explained

Need fitters who know this process?

Are you planning a project where control, sensors and mechanics come together, and need fitters who understand the signals? We install, wire according to the diagram, check every input and work hand in hand with your control system builder. Request a callback – we will get back to you.

Free, no-obligation callback

Tobias Schott, managing director of Omega Mounting GmbH, on a construction site in front of scaffolding

About the author

Tobias Schott

Managing director of Omega Mounting GmbH, Rodgau · more than 20 years of hands-on experience in installation and maintenance

A trained mechatronics technician, working in maintenance, servicing and industrial installation since 2004 – first alongside his father, and with Omega Mounting since 2012: from overhead conveyors in Frankfurt to the crane system in a new-build hall. He plans and leads lifting operations as an appointed person (AP) in data centers and on industrial sites in the Rhine-Main region, trains and examines operators of cranes, mobile elevating work platforms and telehandlers, and is a qualified occupational safety specialist. On jobs abroad he is known as the “German Troubleshooter” – the person you call when a site gets stuck. He learned what quality means from his father, not from a manual: Made in Germany as a standard for his own work, not a label. That is why quality comes first at Omega Mounting – ahead of speed and price. The Technology explained articles cover the equipment and techniques his team uses every day: what counts on site is in them – what only appears in the brochure is not.

EnglishEnglish