You are on page 1of 13

NOTES ON PLC AND INDUSTRIAL NETWORKS

A programmable logic controller (PLC) is an industrial solid-state computer that monitors


inputs and outputs and makes logic-based decisions for automated processes or machines.

PLCs were introduced in the late 1960s by inventor Richard Morley to provide the same
functions as relay logic systems. Relay systems at the time tended to fail and create delays.
Technicians then had to troubleshoot an entire wall of relays to fix the problem.

PLCs are robust and can survive harsh conditions including severe heat, cold, dust, and
extreme moisture. Their programming language is easily understood, so they can be
programmed without much difficulty. PLCs are modular so they can be plugged into various
setups. Relays switching under load can cause undesired arcing between contacts. Arcing
generates high temperatures that weld contacts shut and cause degradation of the contacts in
the relays, resulting in device failure. Replacing relays with PLCs helps prevent overheating
of contacts.

PLCs do have disadvantages. They do not perform well when handling complex data. When
dealing with data that requires C++ or Visual Basic, computers are the controllers of choice.
PLCs also cannot display data well, so external monitors are often required.

PLC Hardware Components

A central processing unit (CPU) serves as the brain of the PLC. It is a -16- or -32-bit
microprocessor consisting of a memory chip and integrated circuits for control logic,
monitoring, and communicating. The CPU directs the PLC to execute control instructions,
communicate with other devices, carry out logic and arithmetic operations, and perform
internal diagnostics. The CPU runs memory routines, constantly checking the PLC (PLC
controller is redundant) to avoid programming errors and ensure the memory is undamaged.
2. PLCs work with inputs, outputs, a power supply, and external programming devices.
Memory provides permanent storage to the operating system for data used by the CPU. The
system’s read-only memory (ROM) stores data permanently for the operating system random
access memory (RAM) stores status information for input and output devices, along with
values for timers, counters, and internal devices. PLCs require a programming device, either
a computer or console, to upload data onto the CPU.

3. A CPU operating cycle includes the following steps: a) start scan; b) internal checks; c)
scan inputs; d) execute program logic; and e) update outputs. The program repeats with the
updated outputs.

PLCs read signals from different sensors and input devices. These input devices can be
keyboards, switches, or sensors. Inputs can be either in digital or analog form. Robots and
visual systems are intelligent devices that can send signals to PLC input modules. Output
devices such as motors and solenoid valves complete the automated system.

4. The top image depicts common inputs in a PLC, including push buttons and switches.
Output connections are shown in the bottom image and include signal out (SOL), pilot light
(PL), and motor ignition (MI).

PLC Programming Language

Five programming languages are used in PLCs. They are defined by the international
standard IEC 61131. Ladder logic is one of the most commonly used PLC languages. In it,
symbols represent opening and closing relays, counters, timers, shift registers, and
mathematical operations. The symbols are arranged into the desired program routine. Rules in
ladder logic are termed “rungs.” Each rung has a single output, but a single input can be
found in more than one rung.

5. Ladder logic can be scanned by PLCs either in horizontal formats shown here (left to right
starting in the upper lefthand corner and progressing to the next line) or in vertical formats
(column by column starting in the upper left hand corner). | | are switches while ( ) is the
action command.

Another programming language is function block diagram (FBD). It describes functions


between input and output variables. The function, represented by blocks, connects input and
output variables. FBD is useful in depicting algorithms and logic from interconnected
controls systems.

Structured Text (ST) is a high-level language that uses sentence commands. In ST,
programmers can use “if/then/else,” “SQRT,” or “repeat/until” statements to create programs.

Instruction list (IL) is a low-level language with functions and variables defined by a simple
list. Program control is done by jump instructions and sub-routines with optional parameters

Sequential Function Chart (SFC) language is a method of programming complex control


systems. It uses basic building blocks that run their own sub-routines. Program files are
written in other programming languages. SFC divides large and complicated programming
tasks into smaller and more manageable tasks.
6. Function Block Diagrams use elementary blocks to represent functions and receive inputs
from lines entering from the left. Lines exiting to the right represent output results.

PLC Communications

RS-232 is the most common method PLCs use to communicate with external devices. It is a
serial communication standard that uses binary code to transmit data in American Standard
Code of Information Interchange (ASCII) format. ASCII translates letters and numbers into
binary code that computers can read. ASCII is a 7-bit code (a bit being “1” or “0”) that, when
translated, results in 128 characters. PLC serial ports transmit and receive data as voltages.
PLCs can be either data terminal equipment (DTE) or data communications equipment
(DCE). A DTE, for example, can be a computer, while a modem is a DCE. Typically, PLCs
are DTEs and external devices are DCEs. When the PLC and the external device connected to
it are the same equipment (i.e., DTE/DTE or DCE/DCE), they cannot communicate with each
other and a null-modem connection must be used.

In serial communications, data gets transmitted one bit at time. Data is separated into its
constituent bits for transmission and reassembled when received by an external device. A
“start bit” is the initial signal sent and precedes any other communication bits. It is considered
the “space” or negative voltage. The “stop bit,” the last code sent, is considered a “Mark” or a
positive voltage.

Eight bits make a byte and PLCs are byte-oriented. ASCII is a seven-bit code, so the eighth
(or “parity byte”) checks to see if data has been corrupted. Common forms of parity include
even (1), or odd (0). The total number of 1s in the byte adds up to an even or odd number.
The sending equipment determines if the communication is even or odd and receiving
equipment compares the result of the parity to the eighth bit to ensure they match. If a device
transmits 1001101 and computes it to be an odd value, it will add a 1 to the eighth bit and
send 10011011. The receiver decides the bit is odd and verifies an odd total of 1 characters.
Baud rate is the number of bits per second transmitted from DTE to DCE. An RS232
transmission would appear as baud rate, data bits, and parity-stop bits. For example, the string
9600-8-1-1 translates to a 9600 baud rate, 8 data bits, a 1 for parity, and a 1 stop bit to end the
transmission.

Software handshaking ensures devices are ready to send and receive data. The receiver sends
the XOFF character when it wants the transmitter to pause sending data. It sends the XON
character when it is ready to receive data again. XOFF is sometimes referred to as the hold-
off character and XON as the release character.

A delimiter is added to the end of messages to tell receivers to process the data just received.
The most common delimiter is the “carriage return” (CR). The PLC or external device
receives the delimiter and takes data from its buffer. The buffer temporarily stores data before
it is processed. The line feed (LF) is sometimes sent with the CR character. If viewed on a
computer, the page moves down a line to start a new line of communication.

PLC Selection Criteria

7. Selecting the correct PLC will depend on the needs and size of the automation system.
Above are examples of different PLCs with varying inputs, outputs, and display options.

There are several requirements to keep in mind when choosing PLCs. Is the proposed system
new or an existing one? Either way, ensure the controller works with mating hardware.

Environmental conditions will affect PLC performance. Typical controllers operate in


temperatures from 0 to 55°C (32°-130°F). The number of discrete devices (On/Off logic
devices) and analog devices determines the number of I/O connections the PLC will need. If
the discrete devices are ac or dc, determine if the PLC can support the required signal.

Determining CPU requirements is important for calculating the amount of RAM needed for
data manipulation and storage. Counters and timers use RAM to store set points, current
values, and other internal flags. If data must be stored over a long period of time, CPU
memory must be sized appropriately.

Program memory or ROM stores program instructions. Analog devices usually require 25
words of memory per device. Examples of analog devices are voltage, current, and
temperature meters or sensors. Simple and sequential applications typically require five
words of memory per I/O device. Complex applications are not as predictable and need more
program memory space.

Serial and Ethernet connection based I/O hardware are typical choices for remote
connections. Remote devices are needed when the PLC is located separately. Serial
connections have a max distance of 50 feet while Ethernet connections can go to a max of
328 feet. These remote devices are referred to as distributed I/O. Finally, be sure the PLC
understands program instructions. Some PLCs come with proportional integral derivative
functions that eliminate the need for technicians to write specific code for closed-loop
process control. 

INDUSTRIAL PROFINET

PROFINET uniquely combines the highest performance with the highest degree of


openness. In the specification V2.3 the mechanisms ‚Fast Forwarding’, ‚Dynamic Frame
Packing’ and ‚Fragmentation’ have been defined as a performance upgrade for PROFINET,
enabling cycle times down to 31.25µs – with unrestricted transfer of standard data in parallel.
PROFINET thus provides the necessary performance to meet even future application
requirements.
PROFINET - best in performance - best in speed.

The increasing digitalization of companies, involving networking in almost all areas and
between IT and OT in particular, is opening up tremendous economic potential. PROFINET
– the leading Industrial Ethernet standard for automation – supports you in creating integrated
processes and configuring networked interfaces. The openness and flexibility of PROFINET
means you enjoy maximum freedom when designing your machine and system structure. Its
unrivaled efficiency allows you to use available resources optimally, while significantly
increasing plant availability. PROFINET’s performance sustainably increases the
productivity in your company. And if you’re wondering what the next step is for
digitalization – straight talk TSN.

PROFINET embodies the idea of enabling manufacturer-neutral automation solutions with an


open standard. PROFINET is 100 percent Industrial Ethernet – the standard that has been
established in industrial communications since the 1990s. This creates the basis for a uniform
automation network to which automation devices and standard Ethernet devices can be
connected.

 Manufacturer neutrality – connectivity and interoperability with components from


various manufacturers

 Investment protection – because you can continue using existing PROFINET


projects and programs when you use TSN in future, and existing PROFIBUS
installations can still be integrated

 Commissioning, diagnostics, and remote maintenance using standard web


technologies – because PROFINET is 100 percent Ethernet and supports TCP/IP 

 Assured ongoing development – PROFINET harmonizes perfectly with cutting-edge


standards such as OPC UA, thanks to IEC/IEEE conformity

Maximum flexibility for implementing your ideas

In view of the increasingly shorter innovation and product lifecycles in all sectors, fast
response times and optimized processes are crucial to ensuring long-term competitiveness.
With its maximum flexibility in plant structures and production processes, PROFINET
enables the implementation of innovative machine and plant concepts. You can integrate
mobile devices, for example, in relatively inaccessible locations.

 Wireless communication – via Industrial Wireless LAN (IWLAN) for automatic


guided vehicles (AGV) and mobile panels, for example

 Safety-related communication – thanks to PROFIsafe, there’s no need for special


network components, and wireless configuration is possible only with IWLAN
components from Siemens

 Flexible topologies – with linear, star, tree, and ring topologies, allowing for later
expansion and offering access to machines and plant via a secured VPN connection,
for remote maintenance purposes for example

 Expandability – thanks to easy integration of existing systems or the addition of new


PROFINET nodes
EtherNet/IP versus PROFINET

Structure of EtherNet/IP and expanding EtherNet/IP applicability

EtherNet/IP is an industrial network protocol that employs the Common Industrial Protocol
(CIP) to standard Ethernet. It works on a network application layer — which (in the two
conceptual models of networks) is at the “topmost” device and user-facing layer to allow
communication between controls and input-output (I/O) devices. More specifically,
EtherNet/IP is the top layer of the Open Systems Interconnection (OSI) and transmission
control protocol/internet protocol (TCP/IP) models.

EtherNet/IP employs:

 The application layer just mentioned

 An Internet Protocol networking layer

 The standard Ethernet link layer

Note that the IP in EtherNet/IP is short for industrial protocol and refers to network protocols
originally developed to allow communication over serial connections such as RS-232 and
RS-485 — both standards for industrial data transmission. Many such connections now
operate over Ethernet using protocols such as TCP/IP, so common for Internet
communications. EtherNet/IP communications and its very standardized hardware (including
hubs, switches, routers, Ethernet cables, and Ethernet network cards) is defined by the IEEE
802.3 Transmission Control Protocol and the Internet Protocol.

EtherNet/IP is rather easy to implement, and it’s compatible with standard Ethernet switches
for industrial automation. However, the basic form of EtherNet/IP is non-deterministic and
therefore unsuitable for strict real-time industrial applications. CIP Motion can complement
EtherNet/IP to help the latter satisfy demanding requirements for deterministic real-time
control (including closed-loop motion control) with unmodified Ethernet in full compliance
with IEEE 802.3 and TCP/IP Ethernet standards.

EtherNet/IP complemented with CIP Motion technology delivers multi-axis distributed


motion control. It is scalable and offers a common application interface for motion designs.
Data transmission via EtherNet/IP

TCP and the user datagram protocol (UDP) are the underlying communication protocols of
the Internet and many private networks as well. EtherNet/IP employs a TCP port for what is
called explicit messaging. Such messaging is when the system sends data to a client in
response to a specific request for that data. It uses TCP/IP — a connection-oriented protocol
that explicitly manages links between clients and servers. Core to TCP/IP networking, TCP
helps fragment data packets so that data messages reach their destination. Note that IP deals
only with packets; TCP lets two hosts establish connection and exchange data streams. TCP
guarantees delivery of data as well as that packets will be delivered in the order in which they
were sent.

EtherNet/IP employs a UDP port for implicit messaging — system communications sent from
preset memory locations to a controller or other client at some prescheduled interval. Such
communications are far faster than explicit messaging, and the one-way data transmission of
UDP connections (sans validating receipts) simplifies cyclical system updates.

PROFINET for deterministic communications

PROFINET is another technical standard that defines a mode of data communication via
industrial Ethernet. PROFINET modifications to standard Ethernet ensure proper and prompt
data transmission even in challenging applications. Its definitions dictate a means of data
collection from industrial equipment and systems to satisfy specific and often tight time
constraints. PROFINET arose from PROFIBUS — a standard for fieldbus communication to
support automation. While PROFIBUS is a classical serial fieldbus based on industrial
Ethernet, PROFINET goes further with additional capabilities to allow faster and flexible
communications to control automation components.

In fact, PROFINET had 30% of the industrial-network market share as of 2018, making it the
world’s leading Ethernet-based communication solution for industrial automation. More than
five million PROFINET-ready devices come to market every year.

PROFINET and PROFIBUS communications are deterministic, which allows support of


automation systems with precise I/O structure limits … and their defined I/O structures allow
precise calculation of maximum update times. PROFINET can also provide isochronous real-
time (IRT) data exchange. IRT essentially leverages the ultra-precise time clock of
PROFINET to prioritize the passage of some types of data traffic and buffer the rest. IRT
excels in demanding applications such as motion control and other applications that need
more deterministic operation than real-time operation. In a real-time data exchange, bus cycle
times are less than 10 msec. In contrast, IRT data exchanges occur within a few dozen μsec to
a few msec.

For example, PROFINET in a packaging and labeling operation can support data
transmission to ensure bottles are filled to a precise level in less than a second — to within
just an msec or so. PROFINET can also detect, quantify, and alert operators of any anomalies
in the bottling process and immediately shutdown processes as well.

Side note on PROFINET hardware

Standard Ethernet is only suitable for data transmission in home, office, and select industrial-
monitoring settings. In contrast, the industrial Ethernet of PROFINET is suitable for
installation in harsh industrial facilities requiring deterministic data communications.
PROFINET cables and connectors differ from those employed in standard Ethernet — and
includes connectors with heavier lock mechanisms and ruggedized industry cables.
PROFINET routers (whether integrated into other hardware or built as standalone elements)
function on network layer three (from the network models mentioned earlier) and
communicate using IP addresses. These routers connect local area networks (LANs) and form
wide area networks (WANs) while employing algorithms to determine the best data-
transmission routes between networks. Some PROFINET switches also employ fiber-optic
connections. These ultra-fast components integrate PROFINET-capable devices into Ethernet
networks (or PROFIBUS) via gateway elements for copper-to-fiber-optic conversions.

PROFINET managed and unmanaged switches

PROFINET switches work on the second data layer of the conceptual network model covered
earlier. They function to control the receipt and transmission of data signals through the
network.

Unmanaged PROFINET switches send incoming Ethernet data through the proper ports
connected to intended device endpoints. Ports may have an LED indicator to show the
presence of data flow, but these unmanaged switches usually don’t provide much more
information about or management of that data flow.

In contrast, managed PROFINET switches are more intelligent and work with different IT
protocols — including the simple network management protocol (SNMP) and link layer
discovery protocol (LLDP) for PROFINET. Because of their intelligence, managed switches
are often used where preventing downtime is a top objective — and where troubleshooting
failures is useful. Of course, they're usually costlier than unmanaged switches.

Direct comparison of EtherNet/IP and PROFINET characteristics

Industry-specific adaptations of EtherNet/IP are transforming many industries. For example,


the packaging industry employs EtherNet/IP for high-speed communications, determinism,
and real-time performance. Industries such as chemical processing, traditional automation,
and power generation use EtherNet/IP to continually quantify output. Still other industrial
applications involve fully automated processes that necessitate counting and real-time data
acquisition for control. Here both EtherNet/IP and PROFINET excel in creating the
deterministic networks such applications require.

Consider EtherNet/IP and PROFINET signal qualities, message sizes, and update rates for
details on how the two differ. PROFINET is generally faster than EtherNet/IP and most often
deployed with standard hardware … though PROFINET IRT requires specific hardware.
EtherNet/IP is more interoperable, as it’s based on object-oriented programming and relies on
commercial off-the-shelf (CotS) components. In fact, that use of CotS components and
hardware not unlike the ubiquitous variations employed in office settings means EtherNet/IP
is very cost effective for high-speed industrial connectivity. Economies of scale and the
interchangeable nature of much of this hardware help minimize upfront costs the most.

In contrast, PROFINET-ready components can integrate into PROFIBUS-based fieldbuses,


effectively capable of supplementing existing systems without necessitating complete
replacement. There are cost benefits to the way existing devices can be shared and existing
networks accept the addition of supplemental hardware. Even so, upfront costs for
PROFINET technologies may be up to 15% more than those based on EtherNet/IP. That cost
is partially offset by easier installation, estimated to be about half as complicated (read:
expensive) as installation of Ethernet/IP.

Topologies and components supported by EtherNet/IP and PROFINET also differ somewhat.
Network topology is the arrangement of the links and nodes of a network. Links are wireless
and wired technologies such as coaxial, ribbon, and twist-pair cable as well as fiber-optic
cable. In contrast, network nodes are hubs, bridges, switches, routers, modems and firewall
interfaces. Topologies include star, line, ring, daisy chain, and mesh.
EtherNet/IP networks primarily use a star topology complemented by others: Ring topology
connects multiple devices sequentially — though if a cable is cut within the ring, each device
maintains its path to control. Tree topology uses devices or switches wired with connections
between device groupings; any break prompts an algorithm to determine the next best
workable path to solution.

PROFINET’s line topology uses minimal cabling and no external switches; connections to
any star and tree topologies are via standalone switches. Here if a star or tree switch fails,
communications to all nodes are affected — which can be problematic. So to ensure
communications continuity, PROFINET supports topologies with added devices to provide
media backup and other elements should a cable or node fail.

Note that EtherNet/IP and PROFINET networks deploy in systems under centralized and
decentralized control — and sometimes work in systems that combine both control
arrangements. With EtherNet/IP and PROFINET, centralized systems use a client-server
setting having a center server connecting one or more client nodes. Client nodes submit
requests to the central server rather than process on their own while the server handles all the
major processing. In decentralized systems, every node autonomously executes its own logic.
The final actions of the system are the sum of all nodes’ logic.

EtherNet/IP and PROFINET gateways

Gateways (whether standalone pieces of hardware or integrated with router, firewall, or


server functions) control the flow of data in and out of a given network and sometimes
between disparate systems. That includes some gateways that are specifically designed to
communicate I/O between EtherNet/IP and PROFINET networks. For the latter, most
gateways function as a PROFINET device and EtherNet/IP adapter for automatic
compatibility.

Besides their primary role, gateways can also unburden a system’s PLC of signal timing,
counting, calculating, comparing, and processing tasks. EtherNet/IP and PROFINET
gateways with router functionality let computers send and receive data over the Internet.
Today, smart human-machine interfaces (HMIs) connected to networks sometimes do
double-duty as gateways between automation systems and controllers as well — for
simplified system commissioning and maintenance.

You might also like