Tiza Group

Home / Guides / Industry and automation

PLC Inputs and Outputs: Types and Wiring

PLC inputs and outputs: PNP and NPN digital, relay and transistor, 4-20 mA and 0-10 V analog; how to wire and protect them.

By Shadai García, CEO and protection engineer at Tiza Group.

+24 V0 VS2S1 NCI0.0I0.1DI 24 V1ML+DOQ0.02MKM1flybackdiodeoutput to interface relay → 230 V AC coilQ0.1K20 VF3KM2L 230 V CAN4–20 mA loop, 2-wire, 24 V24 V+VTAIreturn to the supply −4 mA · 0 %12 mA · 50 %20 mA · 100 %current below 3.6 mA: broken wire or transmitter faultTypesPNP inputTransistor outputInterface relay4–20 mA loop© tizagrp.com+24 V0 VS2S1 NCI0.0I0.1DI 24 V1ML+DOQ0.02MKM1flybackdiodeoutput to interface relay → 230 V AC coilQ0.1K20 VF3KM2L 230 V CAN4–20 mA loop, 2-wire, 24 V24 V+VTAIreturn to the supply −4 mA · 0 %12 mA · 50 %20 mA · 100 %current below 3.6 mA: broken wire or transmitter faultTypesPNP inputTransistor outputInterface relay4–20 mA loop© tizagrp.com
PLC I/O wiring: PNP inputs, transistor output with diode, interface relay, and 4–20 mA loop. Location in the system and operating principle. Illustrative: real values come from the nameplate and the manufacturer's manual.
Short answer

Digital inputs read contacts and sensors at 24 V DC, with PNP or NPN logic; outputs can be relay, transistor, or triac depending on the load. Analog signals handle 4-20 mA or 0-10 V. Wiring takes care of the common, the supply, isolation, protection of inductive outputs, and separation from power.

Short answer

Inputs convert field contacts and sensors into bits or numbers; outputs convert program commands into signals able to drive coils, lamps, valves, or drives. They are divided into digital (two states) and analog (a continuous quantity). Choosing the right type and wiring it with the right common and isolation avoids most commissioning faults. The PLC as a whole is described in what a PLC is and its scan cycle.

Digital inputs

Most work at 24 V DC. There are also 120 or 230 V AC versions, used where the field already carries that voltage. Pneumatic cylinders, 5/2 valves and solenoid valves are explained in industrial pneumatics basics.

ConceptWhat it means
Sourcing or sinkingDefines whether the module supplies or receives current at the input point
PNP sensorWhen activated, it delivers the positive to the input
NPN sensorWhen activated, it connects the input to the negative
CommonTerminal shared by a group of inputs; its connection determines the polarity
Input filterDelay that discards bounce and noise; limits short pulses
IsolationGalvanic separation between the field and the PLC logic

For dry contacts (pushbuttons, limit switches, the auxiliary contact of a contactor), the circuit is fed with 24 V and the contact closes the circuit to the input. Three-wire sensors (brown positive, blue negative, black signal, in the usual color code) require their type to match that of the module. Inductive, capacitive and photoelectric proximity sensors, with PNP or NPN output, are explained in inductive, capacitive and photoelectric sensors.

A design criterion already mentioned in ladder: stop devices and protections are wired normally closed, so that a broken wire is interpreted as a stop.

Digital outputs

TypeHandlesAdvantagesLimits
RelayDC and AC, higher voltagesFull isolation per point, accepts varied loadsSwitches slowly, limited operating life
TransistorDC, normally 24 VFast, no wear, suited to pulsesSmall current, sensitive to short circuits
TriacACNo mechanical wear, useful with resistive loads and small valvesLeakage current at rest, AC only

Each point has a maximum current and each group of points has a maximum total current. A contactor coil or a valve is an inductive load: when the circuit opens it generates a voltage spike. With DC transistor outputs, a flyback diode is installed across the load; on AC, an RC snubber or varistor. With a relay output, the spike wears the contacts and can inject noise into the rest of the panel.

Illustrative example: output for the 15 kW motor contactor

Assumed data: 15 kW, 400 V motor, with contactor KM1 having a 24 V DC coil that draws 5 W (assumed value; each contactor has its own). The output module is transistor type, with an assumed maximum of 0.5 A per point.

Coil current = 5 W / 24 V ≈ 0.21 A, within the assumed 0.5 A limit. The output can drive it directly, with a diode across the coil. If the contactor were 230 V AC, one of two resources would be used: an interface relay with a 24 V coil and a contact rated for the contactor voltage, or a relay output module.

The contactor’s power contacts carry the motor’s approximately 28 A; the PLC never sees that current. The power and control schematic is developed in the guide on direct-on-line motor starting.

Analog inputs and outputs

SignalUseNote
4-20 mAPressure, level, temperature, and flow transmittersImmune to cable voltage drop; 4 mA is the live zero
0-10 VSetpoints, potentiometers, some sensorsSensitive to noise and to drop on long cables
Temperature probes (Pt100 RTD, thermocouple)Direct measurementDedicated modules or transmitters

The module converts the signal to an integer (counts) that the program scales to engineering units, as shown in the Structured Text example. For current inputs, check whether the transmitter is two-wire (powered by the loop) or four-wire, and whether the module supplies that power. Analog outputs, such as the speed reference to a drive, have a minimum and maximum load the module accepts.

Wiring practices

  • Separate power and signal. 400 V and drive cables run away from signal cables, and cross them at right angles.
  • Shield analog signals, with the shield grounded at one end only, per the manufacturer’s criterion.
  • Power the field from a properly sized 24 V supply, with circuit protection and spare capacity.
  • Protect by groups. One fuse or miniature circuit breaker per group of outputs.
  • Label every cable and terminal with the same reference as the schematic and the program.
  • Leave spares: free points for expansion.
  • Separate supplies: the PLC’s, the inputs’, and the outputs’, when the design calls for it, so that a field fault does not shut down the controller.

Special inputs

Some signals do not fit an ordinary digital input:

SignalModule or functionNote
High-frequency pulses (encoders, flowmeters)Fast counter inputThe normal input filter would lose them
Position and speedEncoder moduleCounts edges in hardware
Temperature with Pt100 or thermocoupleTemperature moduleCompensates cold junction and linearizes
Line current and voltageMeasurement module or external meter over a networkNot measured directly on an ordinary input
Safety signalsCertified safety inputsDual channels and diagnostics

Electrical measurement of power, voltage, and energy is better handled with a dedicated meter connected over a network than with analog inputs, as discussed in Modbus RTU and TCP.

Point-to-point test

Before operation, each input and output is verified against the schematic: the field device is actuated and the bit is observed in the PLC. For outputs, the output is forced with the equipment decoupled from the load and the actuator is observed. The test records the terminal, the symbol, the result, and who performed it. It is a record that clients with audits ask for, and it is the fastest way to find reversed polarities, crossed wires, and badly powered sensors before energizing the process. Outputs that control power are tested first with the power load blocked.

Input and output diagnostics

Modern modules report their own faults: a short circuit on an output, a broken wire on an analog input, loss of field power. That diagnostic is brought to an HMI alarm so maintenance can act before the process is affected. When an output does not respond, the order of checks is simple: the bit in the program, the module’s indicator light, the voltage at the terminal, the interface relay, and finally the load. This order separates a program cause from a field cause in a few minutes.

Common mistakes

  • Sensor and module of different polarity (PNP with a sinking module).
  • Exceeding the current per point or per group.
  • Inductive loads without suppression.
  • Sharing the common between different voltages.
  • Signal cables next to drives without shielding.
  • Stop input wired normally open.
  • Analog scaling with a wrongly declared range.
  • Shared 24 V supply without protection, so that a short circuit in the field shuts down the PLC.
  • Not documenting which point goes to which equipment.

Checklist

  • Input type compatible with each sensor.
  • Currents per point and per group within limits.
  • Suppression on every inductive load.
  • Stops and protections wired normally closed.
  • Analog signals shielded and separated from power.
  • Supplies protected by group and with spare capacity.
  • Terminals and wires labeled as in the schematic.
  • Spare points provided.
  • Point-to-point test of every input and output before energizing the process.

Frequently asked technical questions

  • What is galvanic isolation? There is no direct electrical connection between the field and the logic; it is achieved with optocouplers or relays.
  • Can three-wire sensors be connected in series? It is not advisable; each one gets its own input.
  • How much cable does a 4-20 mA signal allow? It depends on the total loop resistance and the available voltage; the module and transmitter datasheets give the limit.
  • How are the I/O checked? With a point-to-point test against the schematic. It is part of commissioning.

How we help

The point-to-point test of inputs and outputs, insulation verification, and review of the schematics before energizing are part of an orderly commissioning. At Tiza Group we do the engineering design and the field tests, and leave the system ready to operate. See engineering design and studies and testing and commissioning, or write to us through contact.

References

  • Hugh Jack, Automating Manufacturing Systems with PLCs (CC BY-NC-SA 3.0 US), chapters on inputs and outputs.
  • Siemens SCE, training documents on controllers (account required).
  • IEC 61131-2, requirements for programmable controller equipment (paid standard).

Frequently asked questions

What is the difference between a PNP and an NPN sensor?

A PNP delivers the positive to the input when it activates; an NPN connects the input to the negative. The PLC input must be compatible with the sensor type, or the PLC will not see it. It is a datasheet item for the module.

When should I use a relay output and when a transistor output?

A relay handles DC and AC, higher voltages, and isolates each point, but it switches slowly and wears out. A transistor switches fast and does not wear out, but it handles only DC and small loads.

Why a 4-20 mA signal and not 0-20 mA?

Because the live zero at 4 mA lets you tell a minimum measurement from a broken wire: if the current drops to zero, it is a fault and not a valid value.

Can a contactor coil be connected directly to the PLC output?

Only if the output and the coil current allow it according to the datasheet. An interface relay is often used to isolate and protect the output, and suppression is added against the voltage the coil generates when it is switched off.

WhatsApp