A small PLC is a compact programmable logic controller. Push-buttons and sensors are wired to its inputs, and contactor coils and indicator lights to its outputs. The conditions that switch the outputs are written in the program, so there is no need to wire auxiliary relays, timer relays or counter relays. The Siemens LOGO! is one example: a controller that mounts on a DIN rail and has 8 inputs and 4 outputs on its base module.
Supply L+ and M
A 24 V DC PLC takes its supply voltage on terminals L+ (plus) and M (0 V). The inputs are on the same terminal row. They are not galvanically isolated: their reference potential is M, so the 24 V for push-buttons and sensors is usually taken from the same supply as the PLC's own.
Inputs
An input is on when there is a voltage between its terminal and M. A push-button or sensor contact is wired between L+ and the input. On the LOGO! 24CE, for example, below 5 V is state 0 and above 12 V is state 1. On some models some of the inputs can also be used as 0–10 V analogue inputs.
A stop button and other NC contacts are wired to an input as they are. The input is then on at rest, and the program uses an NO contact of that input. A wire that comes loose then stops the machine, just as in relay control.
Relay output or transistor output
- Relay output. The output is an NO contact of a relay, with its own terminals 1 and 2. The contact is isolated from the PLC's supply and inputs, so it can switch a different voltage, for example a 230 V load. On the LOGO! base module the continuous current of a relay output may be at most 10 A. Even so, the high inrush current of LED lighting can damage the contacts.
- Transistor output. The output gives the load the PLC's own 24 V, and the load is wired between the output and M. The output is short-circuit proof, but the current is small: on the LOGO! it is at most 0.3 A.
In the LOGO! type designation, R means relay outputs. A contactor coil is wired through a relay output just as through any other contact: +24 V to terminal 1, terminal 2 to A1 of the coil, and A2 to 0 V.
Program scan
In RUN mode the PLC repeats the same scan over and over:
- It reads the states of all inputs.
- It executes the program with these states.
- It writes the results to the outputs.
So the program does not look at the inputs in the middle of a scan. The program sees a change only at the start of the next scan.
Ladder diagram
A ladder diagram (LAD) is a relay diagram turned on its side. The live rail is on the left, and each row (rung) runs through contacts to a coil on the right. An NO contact I1 is closed when input I1 has voltage, and an NC contact I1 is closed when it has none. Coil Q1 switches output Q1. A LOGO! program can be written on a computer as a ladder diagram or as a function block diagram (FBD).
Addresses
- I1, I2 … inputs and Q1, Q2 … outputs.
- M1, M2 … memory bits. They are auxiliary relays inside the program, with no terminal.
- AI1 … analogue inputs and AQ1 … analogue outputs.
- T1 … timers and C1 … counters. A timer works like a timer relay and a counter like a counter relay. In Johdota they are numbered this way. In the LOGO!, timers and counters are function blocks in the program, each with its own block number.
RUN and STOP
In RUN mode the PLC executes the program. In STOP mode the program is not running and the inputs are not read. Relay output contacts are open and transistor outputs are off. The program can then be edited or transferred from a computer. When a LOGO! that holds a program is switched on, it returns to the mode it was in before the power went off. LOGO! Pure models, which have no display, then always go to RUN. A setting decides how the analogue outputs behave in STOP: they either keep their last value or go to a set value. In Johdota there is no such setting: in STOP, relay outputs are open and analogue outputs are at 0 V.
In your region
Showing notes for
United States, Canada
PLC addresses depend on the make. AutomationDirect CLICK PLCs number the inputs X001, X002 … and the outputs Y001, Y002 …, while Allen-Bradley Micro800 controllers use variable names such as _IO_EM_DI_00. The English game uses the CLICK style in the US and Canada.
Source: AutomationDirect: CLICK PLC memory addresses · Rockwell Automation: Micro830, Micro850 and Micro870 user manual 2080-UM002
UK & Ireland, Europe, Australia & New Zealand, Other IEC countries
No regional notes on this page yet. If something is different in your country, please send feedback.
Frequently asked questions
What is a PLC?
A PLC is a programmable logic controller. Push-buttons and sensors are wired to its inputs, and contactor coils and indicator lights to its outputs. The conditions that switch the outputs are written in the program, so auxiliary relays, timer relays and counter relays do not need to be wired.
How do you wire a PLC input?
A 24 V DC PLC is supplied on L+ and M, and an input is on when there is a voltage between its terminal and M. Wire the push-button or sensor contact between L+ and the input. Stop buttons and other NC contacts are wired to the input as they are, and the program uses an NO contact of that input.
What is the difference between a relay output and a transistor output?
A relay output is an NO relay contact with its own terminals 1 and 2. It is isolated from the PLC's supply and inputs, so it can switch a different voltage, such as a 230 V load. A transistor output gives the load the PLC's own 24 V, with the load wired between the output and M. It is short-circuit proof, but its current is small: on the LOGO! at most 0.3 A.
What is the PLC scan cycle?
In RUN mode the PLC repeats the same scan: it reads the states of all inputs, executes the program with these states and writes the results to the outputs. The program does not look at the inputs in the middle of a scan, so it sees a change only at the start of the next scan.
What happens when a PLC is in STOP mode?
In STOP mode the program is not running and the inputs are not read. Relay output contacts are open and transistor outputs are off. The program can then be edited or transferred from a computer.