Catto / Electricity Topic Map · Industrial Automation II Year 7
ElectricityIndustrial Automation II · 144 h · Topic 1 of 5

PLC installation and commissioning

A well-programmed controller is useless if it is badly installed. A very large share of the faults in a new machine are not in the program but in the mounting, the power supply, a reversed polarity or a badly connected shield. This page follows the real path of a control panel: where it is mounted, how it is powered, how inputs and outputs are wired, how it is switched on for the first time, how the program is saved and how it is maintained.

DIN rail 24 V supply PNP / NPN 4-20 mA Commissioning

01Mounting in the panel

The structure of the modules, the memory and the addressing are explained in Structure of a programmable controller; here the focus is what it takes to install them. The layout of the panel determines the working temperature, the noise the signals pick up and how easy maintenance is, and it is the one thing that cannot be fixed later with software.

powerQ124 V supplyK1K2Drive≥ 10 cm3CPUDIDOAI125–50 mm2signal and 24 V controlPE564135 mm DIN rail, screwed to thebackplate and bonded to PE.2Free air above and below the PLC:25 to 50 mm or as the manual says.3Power and signal in separateducts (10 cm or more); if theycross, at 90°.4Heat sources (supply, drive) goapart and never below the PLC.5Shield bar bonded to PE, with360° clamps.6Every field signal goes throughterminals, labelled at both ends.
Figure 1. Typical layout of a control panel with a PLC, front view of the mounting plate. Power goes at the top and apart; the PLC sits on its own rail with free air and away from heat sources; signals run in a different duct and every field connection goes through terminal blocks.
Fixing
  • 35 mm DIN rail (IEC/EN 60715), screwed to the mounting plate every few centimetres: a rail that vibrates loosens everything on it.
  • Metal mounting plate bonded to PE; the rail makes electrical contact with it through screws and washers that bite through paint or zinc plating.
  • The PLC modules snap onto the rail and connect to each other through the backplane bus or connectors: they are assembled from left to right in the order of the configuration, with no gaps.
  • Normal position: horizontal, with the ventilation slots at the top and bottom. Mounted vertically, the permitted temperature range is usually reduced: the manual says so.
Air, heat and spare room
  • Leave free air above and below the PLC (in the order of 25 to 50 mm, or whatever the manual says) and keep the distance to ducts and other devices.
  • The temperature limit (usually up to about 55 °C) refers to the air around the PLC inside the panel, not to the air in the room.
  • Anything that produces heat —supply, drive, braking resistors, transformers— goes apart and never below the PLC, because hot air rises.
  • Reserve space and free terminals (20 to 30 %): something always gets added.
  • If the environment is dusty or damp, the IP protection rating of the enclosure and the ventilation filters are part of the installation.
Keeping power apart from signal

Contactors, drives and motors generate fields and spikes that couple into nearby cables. A 24 V or 4-20 mA signal running alongside a power cable reaches the PLC full of noise. The rules are few: separate ducts for power, control and analog or data signals; a distance of 10 cm or more between them as a general criterion (the PLC manufacturer gives its own); if they have to cross, at 90°; shielded cable for analog and communication signals, and shielded cable also between the drive and the motor (Variable-speed drives). Terminal discipline, labelling and ferrules are covered in Control and signalling units.

Conductor colours

In the power part, the AEA code is followed: neutral light blue, protective conductor green-yellow, phases brown, black and red. In DC control circuits blue is usual (IEC 60204-1). Beware: the blue of DC control and the light blue of the AC neutral look alike; that is why labelling at both ends matters more than colour.

Mount with the panel de-energised

A control panel has 230 or 400 V a few centimetres from the PLC modules. All mounting and wiring is done with the main isolator open, locked out and tagged, and with the absence of voltage verified with an instrument (procedure in Health and safety).

02Power supply and earthing

A panel with a PLC contains three circuits with different needs: the electronics (CPU and modules), the sensors and inputs, and the outputs with their loads. They are fed from a 24 V DC supply, and it pays to protect them separately so that a short circuit in a solenoid valve does not leave the CPU without power.

The 24 V supply
  • Switch-mode and regulated, with safe isolation between the mains and the secondary (safety extra-low voltage, called MBTS/MBTP in AEA 90364 terminology).
  • With a margin over the calculation, and with the voltage set to 24 V on the supply’s potentiometer.
  • If the supply delivers less current at high temperature, the derating curve of the data sheet is used, not the nameplate value.
  • Mounted apart from the PLC (it produces heat) and with its own short, thick wiring to the power terminals.
Protection
  • Primary: a miniature circuit breaker of the rating the supply manufacturer specifies, generally curve C because of the supply’s inrush current (see Electrical protection).
  • Secondary: a fuse or breaker per branch (CPU, sensors, each group of outputs), rated below what the conductor can carry.
  • This way, a fault in one branch trips its own protection and the rest stays energised: the PLC logs it and raises an alarm instead of shutting down.

How to size the supply

Add up the currents of everything fed from the 24 V terminals in the worst case, that is, with everything running at once, and add a margin for expansion, ageing and temperature (25 % is a reasonable value).

Itotal=I1+I2+⋯+In
Isupply≥1.25·Itotal
Worked example · Sizing the supply of a panel

A PLC with 12 digital inputs in use, 12 three-wire inductive sensors, 2 4-20 mA transmitters, one analog module, two digital I/O modules, 6 solenoid valves of 24 V and 3 W, 4 interface relays and 5 LED pilot lights. The values for each module come from its data sheet (those used here are representative).

ConsumerQuantityUnit currentSubtotal
CPU (24 V supply)10.300 A0.300 A
Digital modules (own consumption)20.040 A0.080 A
Analog module10.100 A0.100 A
Active digital inputs (input consumption)120.004 A0.048 A
Three-wire inductive sensors (own consumption)120.015 A0.180 A
4-20 mA transmitters (loop maximum)20.020 A0.040 A
24 V, 3 W solenoid valves (3 W / 24 V = 0.125 A)60.125 A0.750 A
Interface relays (coils)40.040 A0.160 A
24 V LED pilot lights50.020 A0.100 A
Total current in the worst case1.758 A
P=V·I=24V·1.758A=42.2W
Isupply≥1.25·1.758A=2.20A

A supply of at least 2.20 A is needed, so the next commercial value up is chosen:

Prated=24V·2.5A=60W≥1.25·42.2W=52.7W

A 24 V / 2.5 A (60 W) supply covers the demand with the required margin. Each individual output (0.125 A) is also far from the channel limit, which in a transistor module is usually around 0.5 A. The calculation is conservative because it assumes all six solenoid valves energised at the same time; if the process logic never turns them all on together the real demand is lower, but the margin is kept.

Earthing: three different things

What it isWhat it connects toWhat it is for
Protective earth (PE)Mounting plate, DIN rail, doors and enclosures, machine frames.Personal safety: if a phase touches an exposed part, the protective conductor lets the protection open the circuit. Size and continuity according to AEA 90364.
Functional earth (FE)Shields of the shielded cables, mains filters, the “clean earth” terminals of the PLC and the supply.Draining high-frequency noise. Connected with a short, wide conductor (braid or 360° clamp) to the plate or the shield bar.
0 V of the 24 V supplyBonded to PE at a single point, or left floating with earth-fault monitoring, according to the project criterion.Sets the reference potential of the whole 24 V circuit. Two bonds to PE at different points form a loop through which noise currents circulate.
One single point, always

Almost all “mysterious” noise problems come from multiple, accidental earth connections: a shield touching the machine frame at another point, a 0 V bonded to PE at two terminals. Draw an earthing diagram before wiring and stick to it.

03Wiring the inputs

The characteristics of each input type (optical isolation, filter, thresholds, resolution) are in Structure of a programmable controller. Here we deal with the wiring, which is where mistakes are made.

Digital inputs: PNP and NPN sensors

A pushbutton, a limit switch or an auxiliary contact is a dry contact: it works with any module, and the “common” is connected to whichever terminal applies. Three-wire proximity sensors (inductive, capacitive, photoelectric) have an output transistor that can be of two types, and which one it is determines how the module’s common has to be wired.

PNP sensor · common at 0 V (sinking input)On detection the PNP transistor puts +24 V on the input: current enters at I0.0,crosses the optocoupler LED and leaves through the common, wired to 0 V.24 V+24 V0 VPNP sensordetectoroutputInput moduleI0.0COMoptocouplerNPN sensor · common at +24 V (sourcing input)On detection the NPN transistor ties the input to 0 V: current leaves the common (+24 V),crosses the LED the other way round and enters the sensor, which passes it to 0 V.24 V+24 V0 VNPN sensordetectoroutputInput moduleI0.0COMoptocoupler
Figure 2. Digital input with a PNP and with an NPN sensor, animated. The arrow and the dot show the direction of conventional current (from + to −). With a PNP sensor the current enters through the input terminal; with an NPN sensor it leaves through it: that is why the common is tied to 0 V in one case and to +24 V in the other, and why the optocoupler LED reverses.
SensorOn detection, the output…Module commonName of the module
PNP (switched positive)delivers +24 V to the inputto 0 Vsinking input: drains the current to the common
NPN (switched negative)takes it to 0 Vto +24 Vsourcing input: supplies the current to the input
“Sinking” and “sourcing”, depending on who is speaking

In North American literature these terms describe the module’s input, as in the table; in other manuals they are applied to the sensor, and then a PNP sensor is “sourcing” (it supplies current). The confusion is common. Do not settle it by name but by polarity: measure with the multimeter between the sensor output and 0 V, with the sensor powered and detecting. If it reads almost 24 V it is PNP; if it reads almost 0 V (and 24 V when not detecting) it is NPN. Many European modules come with the common at 0 V and expect PNP sensors; NPN is frequent in equipment of Asian origin.

  • Do not mix PNP and NPN sensors in the same input group with a shared common: half of them would be always on or never on.
  • An electronic two-wire sensor has a residual current (one or two milliamps) that may be enough to keep the input at one. If that happens, a resistor is added in parallel with the input, as the manufacturer indicates.
  • Stop pushbuttons and mushroom heads are wired normally closed (see Control and signalling): a broken wire looks like a stop, and that is the safe way.
  • The 24 V that powers the sensors comes from the same supply as the input common. A sensor powered from another supply needs the 0 V of both tied together.

Analog inputs: the 4-20 mA loop

The 4 to 20 mA current is the standard for industrial transmitters because it is not affected by the resistance of the cable. It is connected in two ways depending on how the transmitter is powered.

Two wires · the same pair powers it and carries the signalThe loop current (4 to 20 mA) leaves the + of the supply, passes through the transmitter and the250 Ω resistor of the module, where it produces 1 to 5 V, and returns to 0 V. Shield grounded only at the panel.shieldedcableopen endshield to ground24 V2-wire transmitterAI moduleAI+250 ΩThree wires · power and signal on separate conductorsTwo conductors power the transmitter electronics (+24 V and 0 V) and a third carries the signalcurrent to AI+. The loop closes through the common 0 V. Shield grounded only at the panel.shieldedcableopen endshield to ground24 V3-wire transmittersensorAI moduleAI+250 Ω
Figure 3. 4-20 mA loop with a two-wire and a three-wire transmitter, animated. With two wires the same pair powers the transmitter and carries the signal; with three wires there are two power conductors and one signal conductor. In both cases the current goes through the module’s measuring resistor (250 Ω here), and the cable shield is grounded only at the panel end.
  • Two-wire transmitter (loop-powered): the transmitter behaves like a current source in series. It needs a minimum voltage across its terminals (usually 10 to 12 V) to work.
  • Three-wire transmitter (with its own power): two conductors go to +24 V and 0 V and the third delivers the signal. The 0 V of the supply and the common of the input must be the same potential.
  • The module must be configured for current (by jumpers or by software): a 0-10 V input that receives 4-20 mA reads wrongly and may be damaged. When the loop passes through several devices with different earths, a loop isolator is used (see Control and signalling).
  • Shielding: twisted-pair cable with a braid, the braid grounded to functional earth at one end only, the panel end. At the transmitter end the braid is cut back and insulated. With both ends grounded, the potential difference between the two earths drives a current through the braid and turns it into an antenna. Some manufacturers allow the other end to be connected as well, through a capacitor, but this is only done when they say so.
Worked example · How long can a 4-20 mA loop cable be?

A 24 V supply feeds a two-wire transmitter that needs a minimum of 12 V across its terminals, connected to a module with a 250 Ω measuring resistor. First, the voltage the module measures at the ends of the range:

Vmed=I·Rmed=0.004A·250Ω=1V→0.020A·250Ω=5V

With the maximum current of 20 mA, the total resistance the loop admits is the one that uses up the available voltage (24 V − 12 V):

Rloop,max=24V−12V0.020A=600Ω

Of those 600 Ω, the module already takes 250 Ω; the cable can have at most:

Rcable≤600Ω−250Ω=350Ω

A 0.5 mm² copper cable has, per conductor, 0.0175 Ω·mm²/m / 0.5 mm² = 0.035 Ω/m. For a transmitter 500 m from the panel, the go and return are 1 000 m:

Rcable=ρ·2·LS=0.0175Ω·mm²/m·1000m0.5mm²=35Ω
ΔV=35Ω·0.020A=0.70V→Vtransmitter=24V−5V−0.70V=18.3V

The cable uses 35 Ω of the 350 Ω available, and 18.3 V reaches the transmitter, more than the 12 V it needs. The current is the same at both ends of the cable, which is why the module reads correctly in spite of the cable resistance. That is why 4-20 mA tolerates long cables: the cable resistance only takes voltage away from the transmitter and does not change the current the module reads.

04Wiring the outputs

Outputs are one of the parts of the PLC that suffer most: they switch current, and inductive loads (contactor, relay and solenoid-valve coils) give it back with interest when they open. The output types are compared in Structure of a programmable controller; here, what to check and what to add when connecting them.

Before connecting a load, checkWhy
Voltage and type of the output (DC or AC) against the loadA transistor output only switches DC; a triac output, only AC; a relay output works for both.
Current per channel and per groupThe total current of a group is lower than the sum of the individual maxima: it is in the data sheet.
Inductive or capacitive loadA relay contact’s capacity for coils is lower than for a resistor (utilisation categories AC-15 and DC-13 of IEC 60947-5-1). Incandescent lamps and switch-mode supplies have an inrush current far above the rated one.
Protection per groupOne fuse per output group keeps a short circuit in the field from taking out the whole module.
Safe stateWhat the load does when the output opens or the PLC stops. The safe thing is for the machine to stop: energise to run, de-energise to stop.

Inductive loads: suppression

A coil stores magnetic energy while current flows. When the circuit opens, that current cannot stop instantly: the coil generates whatever voltage it takes —hundreds of volts— to keep it going, and this voltage appears across the output terminals. On a transistor it causes immediate failure or progressive wear; on a relay contact, an arc that erodes it.

Transistor on · current goes to the loadCurrent flows from +24 V through the transistor to the coil and back to 0 V. The diode, with itscathode on the positive side, is reverse-biased and stays out of it.24 V+24 V0 VTransistor outputtransistorsolenoid valvecoilfreewheel diodeoff (reverse-biased)Transistor off · the coil recirculates through the diodeThe coil keeps its current flowing the same way: it circulates through the diode and the voltagestays near 0.7 V. Without the diode a spike of hundreds of volts would destroy the output.24 V+24 V0 VTransistor outputtransistorsolenoid valvecoilfreewheel diodeconductingRelay output, AC load · on opening, the RC snubberThe contact opens while the contactor coil carries current: the parallel RC snubber absorbs theenergy and prevents arcing at the contact (current direction at that instant).230 VL (line)N (neutral)Relay outputcontactcontactorcoilRC snubber
Figure 4. Output with an inductive load, animated in three states. With the transistor closed, current goes to the coil and the diode plays no part. On opening, the coil keeps its current flowing the same way and drives it through the diode. With an AC load, the RC snubber in parallel with the coil does that job.
DC: flyback (freewheel) diode
  • A diode in anti-parallel with the coil: the cathode (the bar) on the positive side, the anode on the 0 V side. In normal operation it is reverse-biased and does not conduct.
  • It goes as close to the coil as possible, not at the module: that keeps the loop of the recirculating current short.
  • A 1N4007 is enough for small and medium 24 V coils. If it is fitted the wrong way round, it is a short circuit.
  • Side effect: the coil de-energises more slowly, because the current decays through the diode. A relay or valve may take too long to release; if that matters, a zener is added in series with the diode.
AC: RC snubber or varistor
  • In AC there is no polarity to exploit: a resistor and a capacitor in series are placed in parallel with the coil, or a varistor (MOV).
  • Many contactor manufacturers sell the snubber module that snaps onto the coil itself, with values calculated for it. Use it instead of improvising values.
  • Typical values for an RC snubber on a 230 V coil are in the order of a hundred ohms and a hundred nanofarads, with an X2-class capacitor.
  • With a relay output that switches often or carries high current, an interposing relay or a contactor is better: the PLC output commands, it does not power.
A PLC output is not a power switch

A motor, a heating element or a pump is switched by a contactor whose coil does hang from the output. Starting energy and short circuits are the business of the contactor and of the protection of the power circuit (Electrical protection). The emergency stop and safety interlocks are also wired in hardware, not only in the program.

05Commissioning step by step

Order matters: you go from what has no voltage to what has, and from what moves nothing to what moves. Each step has an acceptance criterion; if it is not met, you do not move on.

StepWhat is doneAcceptance criterion
1Review and documentation. With the drawing, the I/O list and the program at hand: visual inspection of terminals, labels, ferrules and fuses.Every conductor labelled as in the drawing; no loose wire or empty terminal without explanation.
2Checks with no voltage. PE continuity, every field conductor end to end, no short circuit between +24 V and 0 V (with the ohmmeter, supply isolated from the circuit). Insulation of the power circuits is measured with a megohmmeter only with the modules and electronics disconnected.PE continuous; no short circuit between +24 V and 0 V (the reading does not go to zero); no leakage to earth.
3Energise the supply alone, with the output and sensor fuses open. Measure the voltage at the PLC terminals, not at the supply’s.24 V ± 5 % (22.8 to 25.2 V) and stable as each branch is connected.
4Energise the PLC with the CPU in STOP and outputs disabled, if the device allows it.Power and STOP LEDs on; no fault LED.
5Input test. Operate every sensor, pushbutton and limit switch by hand; simulate the analog inputs with a loop calibrator at 4, 12 and 20 mA.The module LED, the bit in the software and the drawing agree. Analog: 4 mA reads 0 %, 12 mA 50 %, 20 mA 100 %.
6Forced-output test, with the actuator power open or the loads disconnected: force each output one at a time and check what it activates. Then, with the area clear and a warning given, repeat with power.Each output drives the load the drawing shows and no other. At the end all forces are removed.
7Program download. With the CPU in STOP, first save a copy of the program in the device, download the new one and compare the device version with the file.The online comparison shows no differences; version noted in the log.
8No-load test. Go to RUN with the actuator power open. Run through the sequence simulating the inputs; test the emergency stop, a sensor failure and a cut 4-20 mA loop.The sequence matches the specification and each fault leads to a safe state.
9Test with load. Close the power one actuator at a time, measuring currents and times with the equipment in service.Currents within what was calculated, no protection trips, scan time measured and noted.
10Handover. Final copy of the program, drawings updated with site changes, list of settings and commissioning report.The copy is stored in two places and the form is signed.
Forcing an output is operating a machine

Before forcing: the area clear, a warning to anyone nearby, the emergency stop within reach and the actuator able to move without damage (a cylinder is not forced against a stop, a motor is not started without knowing its direction of rotation). One output is forced at a time. An input that is part of a safety circuit is never forced. And in many devices the forced value stays active even if the software is closed or the CPU goes to STOP: check the force table at the end.

06Program backup and maintenance

Where the program lives and how it is saved

The CPU keeps the program in a non-volatile load memory (flash or memory card); what it executes, together with process data, is in working memory. Retentive variables and the clock depend on a capacitor or on a backup battery (memory and retentive area). The program in the device is not a backup: if the CPU breaks, it is lost with it.

What is savedWhat it is for
The complete project (with symbols and comments), not just the binaryA program without symbolic names or comments is almost impossible to maintain.
Hardware configuration and network addressesTo replace the CPU or a module and have the system start up the same way again.
Parameters of drives, panels (HMI) and instrumentsA drive without its parameters is a new device to configure.
Retentive values and recipes actually used in the processWhat was tuned on site is not in the original project.
Software and firmware versions, and access levelsA project from a newer version may not open with the older one.
Copy, version and documentation

Copy before touching anything and after every change, in at least two places (one outside the plant computer). Version in the file name, with the date: Packer_v1.4_2026-10-30, and a change log saying what was modified, by whom and why. Comparison online between the device and the file before downloading: “downloading” a program overwrites the one in the device. Documentation: I/O list, updated diagrams and the user manual at hand. Access passwords are kept in custody: neither left at the factory default nor held only in one person’s head.

Maintaining the controller

TaskFrequencyWhat is checked
Backup batteryAs the manufacturer says; date written on the deviceThe low-battery warning (LED or diagnostic bit). It is replaced with the CPU energised, or with the backup done, so as not to lose memory or clock.
Diagnostic LEDsAt every visitState of the CPU and of the channels (next table).
24 V voltageEvery six months24 V ± 5 % at the PLC terminals and stability under load.
Terminals, shields and earthingYearlyRe-tightening to torque and continuity of PE and of the shield bar.
Panel ventilation and filtersEvery six monthsClean filters and inside temperature within the device range.
Program copyAfter every change and once a yearThat the copy matches the device.

The rest of the plan, with torque-controlled re-tightening and thermography, is the one in Maintenance of electrical components.

LED (typical names)Usual meaningWhat to do
RUN steady greenThe CPU is running the program.Nothing.
STOP yellowThe CPU is stopped.Find out why: a command or a fault.
ERROR / SF redSystem or module fault.Read the diagnostic buffer with the software: it shows the module and the cause.
BF redBus or communication fault.Check the cable, the termination and the addresses of the slaves.
Each channel LEDReal state of the input or output.Compare it with the field: if the LED does not follow the sensor, the problem is before the module.

Exact names and colours vary with the manufacturer: the reference is the device manual.

Fault log and replacing a module

Log: every fault is recorded with date and time, symptom, LED and diagnostic code, cause, action taken and spare used. If the same module fails three times, the cause is usually outside it (supply, noise, missing suppression).

Replacement, in order: (1) stop the machine in a safe state and lock out the energy; (2) note the exact part number of the module and its version; (3) move the removable terminal blocks one at a time, without mixing them; (4) copy the jumpers or selectors of the old module to the new one; (5) energise and watch the LEDs; (6) load the configuration or program if needed; (7) test the module’s inputs and outputs as in commissioning; (8) write everything in the log. Swapping with the equipment energised is only done on systems that expressly allow it.

07In the laboratory

Practice 1 · Wiring inputs with PNP and NPN sensors

Materials: training PLC with a 24 V module, 24 V supply, one PNP and one NPN inductive sensor, multimeter. Steps: wire the PNP sensor first, with the module common at 0 V. With the sensor powered and the input disconnected, measure the voltage between the sensor output and 0 V with and without an object. Connect the input and check the LED and the bit. Repeat with the NPN sensor, moving the common to +24 V. Criterion: the PNP reads close to 24 V when detecting and close to 0 V with no object; the NPN, the opposite; in both cases the input LED lights only on detection. Try and explain what happens if the NPN is connected with the common at 0 V.

Practice 2 · The opening spike of a coil

Materials: a 24 V relay or solenoid-valve coil, a transistor output or a switch, oscilloscope, 1N4007 diodes. Steps: at 24 V, open the output and capture the voltage across the coil without a diode (×10 probe and the scope ground on the circuit’s 0 V); repeat with the diode in anti-parallel and then with the diode reversed, only with a current-limited laboratory supply. Criterion: without the diode, a reverse voltage spike of tens or hundreds of volts; with the diode correctly fitted, the voltage at the output terminal does not go beyond about −0.7 V relative to 0 V; with the diode reversed, a short circuit shows. Also measure how long the contact takes to release with and without the diode.

Practice 3 · The 4-20 mA loop and the cut cable

Materials: loop calibrator (or a laboratory transmitter), analog module, multimeter with a current range, shielded cable. Steps: connect the two-wire loop and measure the current in series and the voltage across the measuring resistor; scale the reading to a variable (0 to 10 bar) and check 4, 8, 12, 16 and 20 mA. Cut the cable and observe the value. Program the detection: “reading below 3.6 mA → sensor fault”. Criterion: the reading follows the current with an error under 1 %; the program tells the zero of the variable (4 mA) from the cut cable (0 mA).

Practice 4 · Full commissioning of a training panel

Materials: panel with PLC, supply, sensors and actuators, the ten-step form from section 05. Steps: follow the steps of the table in order, record every measurement and sign. The instructor introduces two wiring errors (a reversed sensor and a crossed output) that must be found with the checks and the input and output tests. Criterion: both errors found before closing the power, form complete, program copy verified and forces removed.

08Common mistakes

MistakeConsequence
Mixing PNP and NPN sensors on the same commonInputs always on or never on. Solved by wiring each group with the type that applies.
Connecting a 4-20 mA signal to an input configured for 0-10 V (or the other way round)Out-of-range reading, absurd values and sometimes a damaged input.
Leaving out the flyback diode on a DC coil, or fitting it reversedWithout it: spikes that damage the output, with intermittent faults and resets. Reversed: a short circuit.
A supply with no marginVoltage dips and resets when several outputs switch on together. Faults that do not repeat when you look at them.
Shield grounded at both ends, or at neitherCurrents in the braid or undrained noise: unstable analog readings.
Power and analog signal cables in the same ductCoupled noise that no program can filter out later.
Energising everything at once, with no de-energised checksA short circuit on the first connection or an actuator that moves when nobody expects it.
Leaving forced values on at the end of commissioningAn output that does not follow the program, or an input that hides a broken sensor.
Changing the program without copying the previous one firstIf the change goes wrong, there is no way back.
Replacing the battery with the CPU off and no backupRetentive variables, the clock and, in RAM-based devices, the program are lost.

09Self-assessment

What is the module common tied to with PNP sensors and with NPN sensors, and why?

With PNP sensors the common goes to 0 V: the sensor delivers +24 V to the input and the current leaves through the common. With NPN sensors the common goes to +24 V: the sensor takes the input to 0 V, and the current enters through the common and leaves toward the sensor. It is decided by the polarity of the sensor output, not by the name “sinking” or “sourcing”.

Why does a DC coil get a diode, and how is it connected?

Because on opening, the coil keeps its current flowing and generates a very high voltage that destroys the output. The diode, in anti-parallel with the coil and with the cathode on the positive side, gives it a recirculation path and limits the voltage to about 0.7 V. In AC an RC snubber or a varistor is used.

A panel has a 0.30 A CPU, 10 sensors of 15 mA and 4 solenoid valves of 24 V and 3 W. What 24 V supply is needed?

Total current in the worst case, with the valves at 3 W / 24 V = 0.125 A, and a 25 % margin:

Itotal=0.30A+10·0.015A+4·3W24V=0.95A→1.25·0.95A=1.19A

At least 1.19 A is needed: the next commercial value up is chosen.

At which end is the shield of a 4-20 mA cable grounded, and why?

At one end only, the panel end, to the shield bar bonded to earth. With both ends grounded, the potential difference between the two earths drives current through the braid and turns it into a noise source. At the transmitter end the braid is cut back and insulated.

The cable of a 4-20 mA transmitter is cut. What does the module read and what is the advantage?

The current falls to 0 mA, below the 4 mA that represents zero of the variable. The program can detect the condition (below about 3.6 mA) and declare a sensor fault instead of believing the variable is zero. That is the advantage of the “live zero” over 0-10 V.

What is tested before energising, and why are outputs forced without power first?

With no voltage, PE continuity, every conductor and the absence of a short circuit between +24 V and 0 V are checked. Outputs are first forced with the actuator power open to verify the assignment without anything moving; only then is it repeated with power, one at a time and with the area clear.

What must be done before replacing the backup battery, and what is lost if it is not?

You must have a copy of the program and of the retentive data, and replace the battery with the CPU energised if the manual allows it. If the CPU is off and the battery is removed, the retentive variables, the clock and, in RAM-based devices, the program are lost.

Development of the topic “Operation and installation” of Industrial Automation II (Year 7), based on the “Curriculum Proposal – Second Cycle of the Technical-Vocational Track, Secondary Education – Electricity,” Ministry of Education of the Province of Córdoba, DGETyFP. Back to the Electricity Topic Map · catto.ar