Service 4
Service 4
Service 4
Programming
As of 2015, the majority of PLC systems adhere to the IEC 61131-3 standard that
defines 2 textual programming languages: Structured Text (ST; similar to Pascal)
and Instruction List (IL); as well as 3 graphical languages: Ladder Diagram,
Function Block Diagram (FBD) and Sequential Function Chart (SFC).[24][25]
Instruction List (IL) was deprecated in the third edition of the standard.[26]
Modern PLCs can be programmed in a variety of ways, from the relay-derived ladder
logic to programming languages such as specially adapted dialects of BASIC and C.
[citation needed]
While the fundamental concepts of PLC programming are common to all manufacturers,
differences in I/O addressing, memory organization, and instruction sets mean that
PLC programs are never perfectly interchangeable between different makers. Even
within the same product line of a single manufacturer, different models may not be
directly compatible.[citation needed]
Functionality
PLC system in a rack, left-to-right: power supply unit (PSU), CPU, interface module
(IM) and communication processor (CP)
Control panel with PLC (grey elements in the center). The unit consists of separate
elements, from left to right; power supply, controller, relay units for input and
output
The main difference from most other computing devices is that PLCs are intended-for
and therefore tolerant-of more severe conditions (such as dust, moisture, heat,
cold), while offering extensive input/output (I/O) to connect the PLC to sensors
and actuators. PLC input can include simple digital elements such as limit
switches, analog variables from process sensors (such as temperature and pressure),
and more complex data such as that from positioning or machine vision systems.[29]
PLC output can include elements such as indicator lamps, sirens, electric motors,
pneumatic or hydraulic cylinders, magnetic relays, solenoids, or analog outputs.
The input/output arrangements may be built into a simple PLC, or the PLC may have
external I/O modules attached to a fieldbus or computer network that plugs into the
PLC.
The functionality of the PLC has evolved over the years to include sequential relay
control, motion control, process control, distributed control systems, and
networking. The data handling, storage, processing power, and communication
capabilities of some modern PLCs are approximately equivalent to desktop computers.
PLC-like programming combined with remote I/O hardware, allows a general-purpose
desktop computer to overlap some PLCs in certain applications. Desktop computer
controllers have not been generally accepted in heavy industry because desktop
computers run on less stable operating systems than PLCs, and because the desktop
computer
The most basic function of a programmable controller is to emulate the functions of
electromechanical relays. Discrete inputs are given a unique address, and a PLC
instruction can test if the input state is on or off. Just as a series of relay
contacts perform a logical AND function, not allowing current to pass unless all
the contacts are closed, so a series of "examine if on" instructions will energize
its output storage bit if all the input bits are on. Similarly, a parallel set of
instructions will perform a logical OR. In an electromechanical relay wiring
diagram, a group of contacts controlling one coil is called a "rung" of a "ladder
diagram ", and this concept is also used to describe PLC logic. Some models of PLC
limit the number of series and parallel instructions in one "rung" of logic. The
output of each rung sets or clears a storage bit, which may be associated with a
physical output address or which may be an "internal coil" with no physical
connection. Such internal coils can be used, for example, as a common element in
multiple separate rungs. Unlike physical relays, there is usually no limit to the
number of times an input, output or internal coil can be referenced in a PLC
program.