
Introduction to PLC

Hello friends! Today we will begin our PLC series with the hardware and operating principles of a programmable logic controller. My original introduction grew out of an automated coffee-mixing project. That is a useful example because it involves several familiar tasks: reading switches, checking conditions, opening valves and controlling how long a process runs.
Before drawing a ladder program, we need to understand what happens between a sensor and an actuator. A correct program cannot repair an incorrectly wired input, an unsuitable output or a missing power supply. We will therefore work from the controller's main sections through its scan cycle, input and output connections, and a small process example.
The original project identified its controller as a FATEK FBs-20MA. We will retain that family as our example while correcting the old terminal-count and voltage explanations. Always match the complete model suffix and terminal diagram on your own unit. After this introduction, continue with Introduction to Ladder Logic for PLC to turn these hardware concepts into program instructions.
What Is a PLC?
A programmable logic controller is an industrial control system that executes a stored program and exchanges signals with machinery. It combines a processor, memory, power conversion, input and output interfaces, and diagnostic functions in a package intended for a defined operating environment. Its program describes how input conditions should affect internal states and outputs.
A PLC is not simply a microcontroller with unlimited memory or a universally more powerful processor. It usually contains processors or microcontrollers internally. What makes it useful to an automation engineer is the complete platform: documented electrical interfaces, a programming environment, communication options and maintainable connections.
PLCs are used in many production lines, pumping systems and packaging machines. They are not present in every automated product, and their use alone does not make a machine safe. The controller, interfaces, mechanical design and required protective functions must be selected together.
Inputs, decisions and outputs
Imagine a small mixing station. A start button provides a request. A tank-level switch reports whether enough liquid is present. The program decides whether mixing is permitted, and an output commands a motor starter. The PLC normally controls the starter coil or drive command; it does not supply the motor's main operating power directly.
This separation explains why software symbols and electrical loads should not be confused. A program bit named MotorCommand is a logical value. An output terminal is an electrical interface. A contactor is a power-switching device. Each stage has its own ratings and possible failure modes.
Main Sections of a PLC
| Section | Purpose | What you must check |
|---|---|---|
| Power supply | Powers internal circuits and sometimes limited sensor loads | Input voltage and available auxiliary current |
| CPU and memory | Execute logic and store data | Program capacity and supported instructions |
| Digital inputs | Detect on/off field signals | Voltage thresholds and common wiring |
| Digital outputs | Switch or drive compatible external circuits | Relay or transistor type and current limits |
| Analog interfaces | Measure or command continuous quantities | Signal range and scaling |
| Communication ports | Support programming and data exchange | Physical interface and protocol |
Power supply
Some PLC versions accept AC mains and others accept a specified DC supply. The original post described an AC-powered example, but that is not a universal instruction to connect every FBs unit to mains. Read the complete model marking and supply terminals before applying power. The controller's supply input and its field-input signal voltage are separate specifications.
An auxiliary 24 V output, where provided, has a finite current rating. Add the current drawn by every connected sensor and leave the margin required by the installation. For an illustrative set of four sensors drawing 15 mA each, the steady demand is 60 mA before allowing for indicators or startup behavior.
CPU and memory
The processor executes the program and services system tasks. Memory holds instructions, internal bits, registers and configuration. Some values may be retained after a power cycle, while others reset. That behavior must be configured and documented; retaining a production counter is different from retaining a command that could restart a motor.
Memory is finite. The size of an application depends on instruction count, data structures and platform limits, not merely the number of visible ladder rungs. Communication buffers and optional functions may have their own restrictions. A controller that accepts one program is not automatically suitable for every future expansion.
How the PLC Scan Cycle Works
A useful introductory model has three steps: acquire inputs, execute program logic, and update outputs. The controller repeats this cycle while performing background tasks such as communications and diagnostics. Actual platforms may use periodic tasks, interrupts or asynchronous I/O, so the simple model is a foundation rather than a universal timing guarantee.
Within a normally scanned ladder routine, rungs are evaluated in order. A change to an internal bit can affect a later rung in the same scan. PLC logic is therefore not accurately described as every line executing simultaneously. Understanding execution order becomes essential when timers, latches and multiple routines share data.
Why short pulses can be missed
Suppose an ordinary input is sampled every 10 ms. A pulse lasting 2 ms could begin and end between samples, leaving both observed values off. A faster scan may help, but the input filter and hardware response also matter. High-speed counters or interrupt-capable inputs are used when the timing requirement cannot be met by normal scanning.
The response to a physical input includes input delay, task scheduling, program execution and output delay. A relay output also has mechanical operating time. Do not quote the CPU's instruction execution time as the complete sensor-to-actuator response. Define the actual timing requirement and compare it with the whole path.
Identify the FATEK FBs Controller Correctly
FATEK's FBs model specification lists the FBs-20MA family with 12 digital inputs and 8 outputs. The original article's statements about 14 inputs and nine outputs do not describe that 20-point model consistently. The complete nameplate and matching manual take priority over counting labels in a historical photograph.
The same specification lists relay or transistor output variants and a built-in RS232 or USB communication option. Consequently, the earlier statement that this family has no serial communication was also misleading. Connector shape, cable electronics and supported protocol still need to match the actual unit.
The annotated photograph highlights input indicators, controller-status indicators and output indicators. These are useful diagnostic clues. An input LED can show that the hardware recognizes an electrical state, while online monitoring shows what the program is using. Compare both when an output fails to respond.
Read indicators as evidence, not a complete diagnosis
A power indicator suggests that internal supply conditions have reached the controller's indication threshold. A run indication identifies an operating mode. An error indicator directs you toward diagnostic information. Their precise meanings, colors and flashing patterns belong to the model manual, so a single photograph cannot define every fault condition.
An output indicator does not prove that a connected load is receiving the correct voltage. A relay contact may lack its external supply, a fuse may be open, or a wire may be disconnected. Troubleshooting should follow the signal through the software command, output interface, field wiring and load.
Digital Inputs and Common Terminals
Digital inputs interpret a voltage or current condition as a binary state. A nominal 24 V input is not an analog measuring channel, and its switching thresholds are not necessarily exactly 24.000 V. The input specification defines on-state, off-state and allowable electrical limits.
The original terminal photograph is retained to help identify the physical input and output areas. Before wiring, use the terminal diagram for your exact model and suffix. Labels can be arranged in more than one row, and an input common is not interchangeable with every terminal marked as a common elsewhere.
With sourcing and sinking interfaces, current must have a valid path through the sensor, input and common connection. A PNP sensor typically supplies current toward the input; an NPN sensor typically sinks it. Compatibility depends on the PLC input circuit and common arrangement. Match the wiring diagram instead of guessing from the sensor's three wire colors alone.
A dry-contact pushbutton does not generate a signal voltage by itself. It opens or closes a path supplied by the input circuit's field supply. Keep the distinction clear when moving from a software simulator, where a click changes a bit, to a real terminal that needs a complete electrical circuit.
Relay Outputs, Transistor Outputs and Load Power
A relay output closes or opens a contact. On a suitable relay-output group, an external supply feeds the common terminal and the switched terminal routes that supply to the load. The common is not a programmable voltage generator. The voltage comes from the external circuit, and the contact and group ratings limit what may be switched.
A transistor output behaves differently. It is intended for a specified DC arrangement and polarity, with limits on current, voltage and leakage. It cannot be treated as an isolated relay contact that switches arbitrary AC or DC supplies. Select the output type before designing the field wiring.
Check individual and group current
Suppose three illustrative solenoid coils each draw 0.18 A and share an output group. Their combined steady current is 0.54 A. Every channel must support its own coil, and the group's common must support the combined load. Startup demand, duty cycle and suppression also need consideration.
Inductive loads release stored energy when switched off. A DC coil may use an appropriately designed diode or other suppression network; an AC load requires a suitable alternative. Suppression can affect release time, so a protection component should be selected with the actuator's required behavior in mind.
For the first bench exercise, use a compatible low-voltage indicator instead of a motor or heater. That makes the relationship between a program command and an output easy to observe without introducing a large load into an unfinished control sequence.
Analog Inputs and Engineering Units
A temperature transmitter or pressure transmitter often produces a continuous signal such as 4–20 mA or 0–10 V. The PLC needs a compatible analog channel, either built in or provided by an expansion module. A standard digital input cannot recover the full measurement just because the transmitter's voltage changes.
Scaling converts the raw measurement into a useful engineering quantity. For a hypothetical 4–20 mA transmitter representing 0–100 °C, temperature is (I − 4)/16 × 100, with I in milliamperes. At 12 mA, the result is 50 °C. This calculation assumes the transmitter is configured for that range.
The analog module may report a raw integer instead of milliamperes. In that case, use its documented raw endpoints: value = minimum + (raw − rawMinimum)(maximum − minimum)/(rawMaximum − rawMinimum). Detect out-of-range or broken-wire conditions separately rather than silently clamping every abnormal reading into an apparently valid measurement.
A Small Mixing-Station Example
Let us develop the original coffee-mixing idea as a sequence exercise. We will use a start request, a stop condition, a liquid-level indication and a timer. This is a conceptual example for learning program structure, not a complete food-processing machine design.
| State | Expected action | Condition for leaving |
|---|---|---|
| Idle | Valve and mixer off | Valid start request |
| Fill | Open the fill valve | Required level reached or timeout |
| Mix | Close valve and command mixing | Mixing time complete or stop |
| Complete | Remove mixing command and indicate completion | Operator reset |
| Fault | Remove commands defined by the fault response | Fault resolved and deliberate reset |
A timer alone should not assume that liquid arrived. If the level signal never changes, a fill timeout provides a separate path out of the state. Similarly, a displayed motor command does not confirm shaft motion unless the process includes suitable feedback. Writing these expectations before coding makes omissions visible.
Define power-restoration behavior explicitly. For this learning example, returning to idle and requiring a fresh start is easier to reason about than resuming halfway through a cycle. A real process may need another recovery procedure, but it should be a deliberate requirement rather than an accidental consequence of retained memory.
PLC or Microcontroller?
A microcontroller is often attractive for a custom product because the designer controls the board, firmware and unit cost. A PLC is often attractive for an industrial installation because standard interfaces, online diagnostics and replaceable modules can simplify integration and maintenance. Both can be reprogrammed; reprogrammability is not unique to PLCs.
Compare total engineering effort, environmental requirements, service access and production volume. A small custom product may justify designing its own interfaces. A machine maintained by technicians may benefit from familiar industrial hardware and a documented ladder program. Neither choice has unlimited memory or an automatic lifetime advantage.
Getting Started with WinProLadder
FATEK provides WinProLadder and its documentation through the official software download page. Choose software and a programming cable appropriate to the controller. Do not assume that a passive adapter can replace the electrical conversion required by a serial programming interface.
- Record the full controller model and obtain its hardware manual.
- Create a project for the matching controller and define a small I/O list.
- Write one simple rung that makes an indicator follow a test input.
- Check the project for errors before connecting to hardware.
- Confirm supply and terminal wiring with load power isolated as appropriate.
- Transfer the intended program and monitor the input bit, output bit and indicators.
- Remove test forces and save the project with comments and a version note.
Downloading transfers a program to the controller in many PLC tools, while uploading reads from it; verify the tool's wording before replacing an existing program. Keep a recoverable copy of the running project. Online editing and forcing can change machine behavior immediately, so use a controlled bench exercise while learning.
Review and Common Problems
If communication fails, check the cable type, port selection and controller configuration. If an input LED stays off, investigate supply and common wiring before changing ladder symbols. If the program output is on but the indicator load is off, inspect the output supply, channel type and field circuit.
If a sequence behaves differently after restarting, inspect retained data and initialization logic. If short pulses disappear, inspect input filtering and task timing. These observations are more useful than replacing the PLC simply because one symptom looks like a software problem.
Frequently Asked Questions
Does a PLC supply power to every connected load?
No. Outputs control compatible external circuits, and many loads require separate power supplies, contactors or drivers. An auxiliary supply also has a limited rating.
Can all PLCs measure analog signals?
No. Confirm that the selected CPU or expansion module supports the required voltage, current or sensor interface and resolution.
Is an inverted ladder contact the same as a normally closed physical switch?
No. One is an instruction that tests a stored bit; the other describes a device's electrical contact behavior. The next ladder-logic tutorial explains that distinction in detail.
Is ordinary PLC logic sufficient for an emergency stop?
A general-purpose program is not a complete safety function. Machinery protection requires an appropriate architecture and components selected for the required risk reduction.
What should I learn next?
Start with contacts, coils and scan order in the ladder-logic introduction. Once a single input and output make sense, add an interlock, a timer and a clearly defined process state.
























Comments
4