Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

iCC 2003 CAN in Automation

CIP Safety: Safety Networking for the Future

David A. Vasko, Suresh R. Nair, Open DeviceNet Vendors Association

Safety networks have emerged, which allow control system developers to replace
hardwired safety chains with communication networks. Typically using industry
standard networks for the base services, these safety networks add additional
services to transport data with high integrity. Unfortunately the user must change
their approach when going from one network or media to another. This paper
presents a scalable, network independent approach to safety network design, where
the safety services are described in a well defined layer, allowing the network to be
changed without impacting the user’s approach to safety. This approach also enables
the routing of safety data, allowing the user to create end to end safety chains across
multiple links without being forced to difficult to manage gateways.

Introduction could make their application safe. But this


meant that significantly more checking and
The same motivations for greater redundant coding information would be
distances, increased flexibility, reduced required. Fortunately communication
cost and maintainability which originally networks evolved and more capable
moved communication networks into the inexpensive microprocessors became
industrial environment are also driving the available to implement these additional
development of industrial safety networks, functions.
along with the realization of the limitations
of traditional hardwired safety solutions.
To clarify the additional safety
requirements, an existing railway
Hardwired safety systems employ safety standard1 was used and later extended by
relays which are interconnected to provide the Germany Safety Bus committee2. This
a safety function. Hardwired systems are provided design guidelines to safety
difficult to develop and maintain for all but network developers to allow their networks
the most trivial applications. Furthermore, and safety devices to be certified to
these systems place significant restrictions IEC615083.
in the distance between devices. As
safety system developers progressed
beyond basic E-stop functions, they found Unfortunately since the first safety
themselves forced to fall back to hardwired networks were intricately tied to a
logic techniques, which have been out of particular media type or media access
widespread use since the early 1970s. scheme, users were forced to change their
Even when they were successful in approach to safety when they changed
developing a significant size safety media or network. This also meant that
system, they were often costly and difficult users that needed a safety chain to span
to maintain. more than one network link, would need to
employ complex safety gateways, which
now became part of the safety function.
Because of these issues, as well as
distance and cost considerations, it is
desirable to allow safety services to be Fortunately, the Common Industrial
implemented on standard communication Protocol (CIP™)4, which allows network
networks. The key to these developments independent routing of standard data,
was not to create a network which couldn’t could be extended to allow high integritya
fail, but to create a system where failures
in the network, would cause safety devices
a
to go to a known state. If the user knew Integrity is defined as the ability to perform a
which state the system would go to, they function on demand. IEC61508 requires that
the probability of failure on demand be less
CAN in Automation Session

safety services. This paper presents a device is responsible for ensuring the
solution for a scalable, routable, network integrity of the data. If an error occurs in
independent safety layer, thus removing the transmission of data or in the
the requirement for dedicated safety intermediate router, the end device will
gateways. Since all safety devices detect the failure and take an appropriate
execute the same protocol, independent of action.
which media they resided on, the user
CIP Safety CIP Safety
approach is consistent and independent of App Objects App Objects
media or network used.
CIP Safety CIP Safety
Connection Connection
CIP Routing
CIP Safety: A Common Industrial Protocol DeviceNet DeviceNet EtherNet/IP EtherNet/IP
Transport & Transport & Transport & Transport &
for Safety Data Link Data Link Data Link Data Link
Layer Layer Layer Layer
The Common Industrial Protocol (CIP) is DeviceNet Ethernet /IP
designed to allow different networks to be
used with a common protocol. Since it is Figure 2: Routing of safety data
designed to be media and data link
independent it allows for expansion to This routing capability allows the creation
future networks. CIP Safety is the TÜV of DeviceNet™ Safety cells with quick
approvedb extension to standard CIP. It reaction times to be interconnected with
extends the model by adding CIP Safety other cells via a backbone networks such
application layer functionality, as shown in as EtherNet/IP™ Safety for interlocking,
Figure 1. as show in Figure 3. Only the safety data
Safety Other
that is needed is routed to the required
Semicon Other
Devices
Drives Valves
Profiles
I/O
Profiles
Safety
Profiles cell, which reduces the individual
User
Layer bandwidth requirements. The combination
Safety Application
Application Object Library
Object Library of fast responding local safety cells and
the inter cell routing of safety data allows
CIP

CIP Safety
Application Layer users to create significant safety
Application
and
transport
CIP Application Layer
Explicit, I/O, Routing applications with fast response times.
Layer

Safety
Safety Safety
Safety
ControlNet
Encapsulation PLC
PLC PLC
PLC
Adaptation DeviceNet
Data Link
Data Link TCP
IP
UDP
Futures EtherNet/IP
and Data Layer
Link Layer
Layer [CAN]
(CTDMA) Ethernet Da ta Link
Layer (CSMA/CD)
Safety
Future
Physical DeviceNet ControlNet Ethernet
(Firewire, USB,
Layer Physical Layer Physical Layer Physical Layer
Blue Tooth) Router Router Router
Router Router Router
DeviceNet ControlNet Ethernet /IP Other Networks
DeviceNet DeviceNet DeviceNet
Safety 1 Safety 2 Safety 3
Figure 1: CIP communications layers

Because the safety application layer II II OO


Safety
Safety II II OO
Safety
Safety II OO
PLC PLC
extensions do not rely on the integrity of PLC PLC

the underlying standard CIP and data link


Figure 3: Network Routing
layers, single channel (non-redundant)
hardware can be used for the data link
communication interface. This same Implementing Safety
partitioning of functionality allows standard
routers to be used to route safety data, as The CIP Safety application layer is
shown in Figure 2. The routing of safety specified using a Safety Validator object.
messages is possible, because the end This object is responsible for managing
the CIP Safety connections and serves as
the interface between the safety
than 10-3 for high integrity SIL3 safety application objects and the link layer
applications. connections, as shown in Figure 4. The
b
The CIP Safety concept has been approved Safety Validator ensures the integrity of
by TÜV Rheinland for use in IEC61508 SIL3 the safety data transfers.
and EN954-1 Cat. 4 applications
iCC 2003 CAN in Automation

Measures to detect
communication errors
Data Connection
Producing Consuming Time ID for Safety Redundan Diverse
Safety Safety
Safety
Data Data Expectati send CRC cy with measure
Application
Producer Consumer Safety Application
Validator Validator on via and Cross
Client Server time receive Checking
Safety_Data stamp
Safety_Data
Reception
Production
Safety_Ack
Message
Repeat
X X*
Safety_Ack
Reception Production
Message Loss
X X*
Time Coordination
Connection Message
Insertion
X X X*
Data Data
Consumer Producer Incorrect
Sequence
X X*
Message
Figure 4: Relationship of Safety Validators Corrupt
X X
Message
Delay
X
•The producing safety application Coupling of
uses an instance of a client safety and
X
safety data
validator to produce safety data
Coupling of
and ensure time coordination. safety and
X X X X X
standard data
• The client uses a link data
Increased age
producer to transmit the data and a of data in
X
link consumer to receive time bridge

coordination messages. * The Safety CRC provides additional protection for


communication errors in fragmented messages.
• The consuming safety application
uses a server validator to receive Table 1: Error detection measures
and check data.
• The server uses a link consumer to
Time Expectation via a Timestamp
receive data and a link producer to
transmit time coordination All CIP Safety data is produced with a
messages. timestamp which allows safety consumers
The link producers and consumers have to determine the age of the produced data.
no knowledge of the safety packet and This detection measure is superior to the
fulfill no safety function. The responsibility more conventional reception timers.
for high-integrity transfer and checking of Reception timers can tell how much time
safety data lies within the Safety has elapsed since a message was last
Validators. received, but they do not convey any
information about the actual age of the
Safety Validators Ensure Integrity data. A timestamp allows transmission,
media access/arbitration, queuing, retry
CIP Safety does not prevent and routing delays to be detected.
communication errors from occurring, but
it ensures transmission integrity by Producer Consumer
Count Count
detecting errors and allowing devices to 0 Ping 89
take appropriate actions. The Safety 1
2
90
91
Validator is responsible for detecting these 3
Consu
m er time
= 92 92
4 93
communication errors. The nine Offset = 92-5=87 5 94

communication errors which must be 6


7
95
96
Time Stamp =
detected are shown in Table 1c along with Timestamp = 87+8=95 8
9
95 97
98 Max. age = 98-95 =3
the five measures CIP Safety uses to 10 99
11 100
detect these errors. 12 101
13 Time Stamp = 102
Timestamp = 87+14=101 14
101
103
15 104 Max. age = 104-101 =3
16 105
17 106
c
Initially based on Draft proposal test and
certification guideline, safety bus systems, BG Figure 5: Timestamp
Fachausschuß Elektrotechnik 28-May-2000
CAN in Automation Session

Time is coordinated between producers distanced of 4 for each data transfer


and consumers using ping requests and section, though the overall Hamming
ping responses, as shown in Figure 5. distance coverage is greater for the
After a connection is established, the complete transfer due to the redundancy
producer will produce a ping request, of the protocol. The Safety CRCs are
which causes the consumer to respond generated in the safety producers and
with its consumer time. The producer will checked in the safety consumers.
note the time difference between the ping Intermediate routing devices do not
production and the ping response and examine the Safety CRCs. Thus by
store this as an offset value. The producer employing end-to-end Safety CRCs, the
will add this offset value to its producer individual data link CRCs are not part of
time for all subsequent data transmissions. the safety function. This eliminates
This value is transmitted as the timestamp. certification requirements for intermediate
When the consumer receives a data devices and helps to ensure that the
message it subtracts its internal clock from safety protocol is independent of the
the timestamp to determine the data age. network technology. The Safety CRC also
If the data age is less than the maximum provides a strong protection mechanism
age allowed, the data is applied, otherwise which allows underlying data link errors
the connection goes to the safety state. such as bit stuffing5 or fragmentation
The device application is notified so that errors to be detected.
the connection safety state can be
appropriately reflected.
The individual link CRCs are not relied on
for safety, but they are still enabled. This
The ping request and response sequence provides an additional level of protection
is repeated periodically to correct for any and noise immunity, by allowing data
drift in producer or consumer crystal drift. retransmission for transient errors at the
local link.
Production IDentifier (PID)
Redundancy and Crosscheck
A Production IDentifier is encoded in each
data production to ensure that each Data and CRC redundancy with cross
received message arrives at the correct checking provides an additional measure
consumer. The PID is derived from an of protection by detecting possible
electronic key, the device Serial Number corruption of transmitted data. They
and the CIP Connection Serial Number. effectively increase the Hamming distance
Any device inadvertently receiving a of the protocol. These measures allow
message with the incorrect PID will go to a long safety data packets, up to 250 bytes,
safety state. Any device that doesn’t to be sent with high integrity. For short
receive a message within the expected packets of 2 bytes or less, data
time interval with the correct PID will also redundancy is not required; however,
go to a safety state. This measure redundant CRCs are cross checked to
ensures that messages are routed ensure integrity.
correctly in multilink applications.
Diverse Measures for Safety and Standard
Safety CRC (Cyclic Redundancy Code) The CIP Safety protocol is present only in
safety devices; this prevents standard
All safety transfers on CIP Safety use devices from masquerading as a safety
Safety CRCs to ensure the integrity of the device.
transfer of information. The Safety CRCs
serve as the primary measure to detect
possible corruption of transmitted data. d
They provide detection up to a Hamming Hamming distance used in communication
theory to measure the minimum number of bit
errors required before a transmission error
may not be detected.
iCC 2003 CAN in Automation

Safety Connections
To optimize the throughput on DeviceNet,
CIP Safety provides two types of safety three data link connections are used for
connections: each Multi-Cast connection, as shown in
• Single-Cast Figure 8. The data and time correction
• Multi-Cast messages are sent on separate
connections. This allows short messages
A Single-Cast, as shown in Figure 6,
to be transmitted on DeviceNet within a
allows a Safety Validator Client to be
single CAN frame and reduces the overall
connected to a Safety Validator Server
bandwidth, since the time correction and
using two link layer connections.
time coordination messages are sent at a
much slower periodic interval .
Data Connection
Producing Consuming
Safety Safety
Application Safety
Data
Producer
Data
Consumer Safety Application When Multi-Cast messages are routed off
Validator Validator
Client Server link, the router combines the data and time
Safety_Data
Production
Safety_Data
Reception
correction messages from DeviceNet and
Safety_Ack Safety_Ack separates them when messages reach
Reception Production
DeviceNet. Since the safety message
Time Coordination contents are unchanged, the router
Connection
Data Data
provides no safety function.
Consumer Producer Consuming
Producing Data Connection 1
Safety
Safety Safety Data Data
Safety Application
Application
Validator Producer Consumer Validator 1

Figure 6: Single-Cast Connection Client Server 1


Safety Data Time Coordination Connection 1 Safety Data
Production Reception
Data Data
Safety Ack Consumer Producer
Reception Safety Ack
Production

A Multi-Cast connection, as shown in


Time
Correction Time Correction Connection 1 Time
Production Correction
Data Data
Figure 7, allows up to 15 Safety Validator Producer Consumer
Reception

Servers to consume safety data from a Consuming


Safety Validator Client. When the first Data Connection 2 Safety
Safety
Application

Safety Validator Server establishes a


2
Data Data Validator
Producer Consumer
Server 2
connection with a Safety Validator Client, Time Coordination Connection 2
Safety Data
Reception

a pair of link layer connections are Data


Consumer
Data
Producer Safety Ack
Production

established, one for data and time Time Correction Connection 2


Time
Correction

correction and one for time coordination. Data


Producer
Data
Consumer
Reception

Each new Safety Validator Server will use


the existing data and time correction Figure 8: Multicast Connection on DeviceNet
connection and establish a new time
coordination connection with the Safety Message Packet Sections
Validator Client.
CIP Safety has four message sections:
1) Data section
2) Timestamp section
Data Connection 1 Consuming
Producing
Safety
Safety Data Data
Safety Safety
Application
Application Validator Producer Consumer Validator 1
Client
Safety Data Time Coordination Connection 1
Server 1
Safety Data
3) Time correction section
Production
4) Time coordination section
Data Data Reception
Safety Ack
Consumer Producer Safety Ack
Reception
Time Production
Correction Time
Production Correction
Reception
CIP Safety supports two formats for the
Consuming data section. The short format, shown in
Safety

Data
Data Connection 2
Data
Safety Application
2
Figure 9, provides high integrity
Validator
Producer Consumer
Server 2 transmission for up to 2 bytes of safety
Time Coordination Connection 2
Data Data
Safety Data
Reception data and serves as the primary format for
Consumer Producer Safety Ack
Production most safety data messages. It includes a
Time
Correction
Reception
single instance of the safety data, an 8-bit
Safety CRC and an 8-bit Safety CRC
calculated on an inverted image of the
Figure 7: Multi-Cast Connection data.
CAN in Automation Session

Short Data Section The Complete Message Telegrams


Actual Data Mode Byte Actual CRC Comp. CRC

1 - 2 Bytes CRC-S1 CRC-S2 The individual message sections are


appended together to form complete
Figure 9: Short data section format message telegrams. Figure 14 through
(1-2 bytes) Figure 16 show the message packets for
short data messages (1-2 bytes).
The long format, shown in Figure 10,
provides high integrity transmission for up The Single-Cast message packet, shown
to 250 bytes of safety data. In the long in Figure 14, appends the data section to
format the original safety data and inverted the timestamp section to form the
safety data are sent along with a 16-bit producer to consumer message packet.
Safety CRC and a 16-bit Safety CRC of The consumer to producer message
the inverted safety data. This strong packet consists entirely of the time
protection mechanism allows safety coordination message section.
messages to be as long as 250 bytes. Data Message
Producer to Consumer
Mode
Data 0 Data 1 CRC-8 CRC-8' Time_Stamp CRC-8
Long Data Section Byte

Actual Data Mode Byte Actual CRC Complemented Data Comp. CRC Short Data Section Time Stamp Section Time Coordination
Message
3 - 250 Bytes CRC-S3 3 - 250 Bytes CRC-S3 Consumer to Producer
Ack_ Consumer_Time Ack_
CRC-16
Byte _Value Byte_2

Figure 10: Long Data Section Format Figure 14: Single-Cast Message Packets
(3-250 bytes)
The Timestamp section of the protocol, as In the multicast message packet, shown in
shown in Figure 11, is used to mark the Figure 15, an additional Time Correction
production time of all safety productions. section is added to the producer to
Time Stamp Section
consumer message to provide time
Mode Byte synchronization among the multiple
Time Stamp CRC_S1
consumers.
Data Message
Figure 11 Timestamp Section Producer to Consumer

Mode MCast MCast

The time correction section, shown in


Data 0 Data 1 CRC-8 CRC-8' Time_Stamp CRC-8 Time_Correction CRC-16
Byte Byte Byte_2

Figure 12, is used only for Multi-Cast Short Data Section Time Stamp Section
Time Coordination
Time Correction Section

messages. It is used to adjust an Message


Consumer to Producer
individual consumer’s time count for Multi- Ack_
Byte
Consumer_Time
_Value
Ack_
Byte_2
CRC-16

Cast connections. This section is not Figure 15: Multi-Cast Message Packets
needed in Single-Cast messages because
each producer is only associated with a When the Multi-Cast message packet is
single consumer. sent across DeviceNet, as shown in Figure
Ack_ Consumer_Time Ack_
16, the Time Correction section is sent as
CRC-S3 a separate producer to consumer
Byte _Value Byte_2
message. This optimization allows the
Figure 12: Time Correction Section high frequency data messages to be sent
(Multi-Cast only) in a separate CAN frame, while the
The time coordination section, shown in background time correction messages are
Figure 13, contains the information sent produced at a slower frequency,
from consumers to producers to correct conserving bandwidth and improving
the time value. response time.
Data Message
Producer to Consumer
Mode
Data 0 Data 1 CRC-8 CRC-8' Time_Stamp CRC-8
MCast_ Time_Correction MCast_ Byte

CRC-16
Byte _Value Byte_2 Short Data Section Time Stamp Section
Time Correction Message
Producer to Consumer
Figure 13: Time coordination section MCast
Byte
Time_Correction
MCast
Byte_2
CRC-16
Time Coordination
Message
Consumer to Producer
Ack_ Consumer_Time Ack_
CRC-16
Byte _Value Byte_2

Figure 16: Multi-Cast Message Packets


(DeviceNet)
iCC 2003 CAN in Automation

The complete message telegram for long There are two types of Safety_Open
messages is formed by replacing the short requests:
data section in Figure 14 through Figure • Type 1: With configuration
16 with the long data section shown in
Figure 10. • Type 2: Without configuration
With the Type 1 Safety_Open,
configuration and connections are
Configuration established at the same time. This allows
rapid configuration of devices with simple
Before safety devices can be used in a
and relatively small configuration data.
safety system, they must first be
configured and connections must be With the Type 2 SafetyOpen, the safety
established. The process of configuration device must first be configured and the
requires configuration data from a SafetyOpen then establishes a safety
configuration tool to be placed in a safety connection. This separation of
device. There are two possible sequences configuration and connection
for configuration: establishment allows the configuration of
devices with large and complex
• Configuration Tool directly to configuration data.
device, or
In both cases, the SafetyOpen establishes
• Via an intermediate device. all underlying link layer connections:
In the configuration tool to device case, as across the local link as well as any
shown in Figure 17, the configuration tool intermediate links and routers.
writes directly to the device to be
configured (1) (2).
Configuration Implementation
In the case of intermediate device
configuration, the tool first writes to an CIP Safety provides the following
originator (1) and the originator writes to protection measures to ensure the integrity
the target using an Originator to Target of configuration:
Download (3) or a Safety_Open service
• Safety Network Number
(4). The Safety_Open service (4) is
unique in that it allows a safety connection • Password Protection
to be established at the same time that a • Configuration Ownership
device is configured. • Configuration Locking
Safety Network
)
igi d
tor

Configuration Tool
(2 ol to
Or nloa

(T

Safety Network Number


)D
na

ow Tar
l to ow

nlo get
oo D
(T (1)

ad )

(3) Download
The safety network number provides a
(Originator to Target Download) unique network identifier for each network
Originator Target
in the safety system. The safety network
(4) SafetyOpen Configuration
Device Device number combined with the local device
address allows any device in the safety
Figure 17: Configuration Transfers system to be uniquely addressed.

Connection Establishment Password Protection


The CIP protocol provides a connection All safety devices support the use of an
establishment mechanism, using a optional password. The password
Forward_Open service which allows mechanism provides an additional
producer to consumer connections to be protection measure, prohibiting the
established locally or across multiple links reconfiguration of a device without the
via intermediate routers. An extension of correct password.
the Forward_Open, called the
Safety_Open service has been created to
allow the same multi-link connections for
safety.
CAN in Automation Session

Configuration Ownership Summary

The owner of a CIP Safety device can be The concept presented in this paper
specified and enforced. Each safety demonstrates a scalable, routable network
device can specify that its configuration is independent safety protocol based on
configured by a selected originator or that extensions to the CIP architecture. This
the configuration is only configured by a concept can be used in solutions ranging
configuration tool. from device level networks such as
DeviceNet™ to higher level networks such
as EtherNet/IP™. By designing network
Configuration Locking
independence into CIP Safety, multilink
Configuration locking provides the user routing of safety connections can be
with a mechanism to ensure that all supported. Functions such as multilink
devices have been verified and tested routing and Multi-Cast messaging provide
prior to being used in a safety application. a strong foundation that enable users to
create the fast responding local cells and
interconnect remote cells that are
Safety Devices required for today’s safety applications.
The design also enables expansion to
The relationship of the objects within a future network technologies as they
safety device is shown in Figure 18. Note become available.
that CIP Safety extends the CIP common
object model, with the addition of Safety
I/O assemblies, Safety Validator, and David A. Vasko
Safety Supervisor objects. Rockwell Automation
1 Allen-Bradley Drive Mayfield Hts. OH
Application Data
Application Profile Objects 44124 USA
Diagnostics,
NVS/Config, Parameter Standard IO
Phone: 440 646 4695
Safety IO
Handling Objects Assemblies
Assemblies Fax: 440 646 3076
davasko@ra.rockwell.com
www.rockwellautomation.com
Safety
Identity
Suresh R. Nair
Supervisor
Rockwell Automation
DeviceNet 1 Allen-Bradley Drive Mayfield Hts. OH
Message 44124 USA
Router
Safety
Phone: 440 646 4471
Validator Fax: 440 646 3258
srnair@ra.rockwell.com
Standard
Connections Safety
www.rockwellautomation.com
Explicit Msg
Connections
Objects

References

1
Figure 18: Safety Device Objects EN 50159-1:2001: Railway applications,
communication, signaling and processing
Safety Supervisor systems.
2
The Safety Supervisor object provides a Draft proposal test and certification guideline,
common configuration interface for safety safety bus systems, BG Fachausschuß
Elektrotechnik 28-May-2000
devices. The Safety Supervisor object 3
centralizes and coordinates application IEC 61508/1999: Functional safety of
E/E/PES safety-related system
object state behavior and related status 4
information, exception status indications CIP Common Specification, ODVA
5
(alarms and warnings), and defines a Eushiuan Tran, May 1999 Multi-Bit Error
behavior model which is assumed by Vulnerabilities in the Controller Area Network
objects identified as belonging to safety Thesis, CMU
devices.

You might also like