- Technology explained – key term
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
- Purpose: Control sequences automatically: evaluate sensors, check conditions, switch actuators.
- Inputs: Buttons, switches, proximity switches, light barriers, cylinder switches.
- Outputs: Solenoid valves, contactors for motors, indicator lamps, frequency converters.
- Mode of operation: Cyclic: read inputs, run the program, write outputs – again and again within a few milliseconds.
- Programming languages: Ladder diagram, function block diagram, structured text, sequential function chart according to IEC 61131-3.
- Types: Compact controller for simple tasks, modular PLC for systems, safety controller for protective functions.
- Common misconception: When the system stops, the control is to blame – usually it is just missing a signal from outside.
Input, program, output: the cycle
A PLC works in a fixed loop and decides afresh in every pass which outputs are switched on.
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
With three building blocks almost any basic logic can be built – and every everyday condition can be phrased as “if …, then …”.
- AND: The output is only on when all inputs are on. Example: the belt runs when there is a release AND no jam is reported AND the guard door is closed.
- OR: The output is on when at least one input is on. Example: the fault lamp lights up when the motor protection trips OR a jam is reported.
- NOT: The output inverts the signal. Example: the diverter may switch when there is NOT a parcel on it.
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.
| Input A | Input B | A AND B | A OR B | NOT 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.
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:
- Extendwhen start is pressed AND the cylinder is retracted AND there is no fault.
- Hold via latching until the cylinder reports the front end position.
- Retractwhen the front end position is reached OR stop is pressed.
- Timer: If the end position is not reported after a set time, the controller outputs a fault.
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.
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.
- In the event of a fault we check the inputs first: does the LED light up when the sensor is occupied?
- We look for the cause in mechanics, sensors, valves and cables before anyone suspects the control.
- We replace sensors and valves like for like so that signal and logic continue to match.
- We label lines and devices so that they can be found in the circuit diagram.
- We leave changes to the program to the manufacturer or control system builder.
- We integrate safety devices as specified and test them before the system runs again.
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.
More technology explained
Technology explained
the actuator from the example.
Technology explained
why valve type and program belong together.
Guide
the guide to troubleshooting.
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
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.