ethernet-based industrial communication protocols...

50
Ethernet-Based Industrial Communication Protocols Connect LabVIEW to PLCs

Upload: volien

Post on 23-Apr-2018

223 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet-Based Industrial Communication

Protocols – Connect LabVIEW to PLCs

Page 2: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Agenda

• Why Ethernet-Based Protocols?

• Overview of Ethernet-Based Industrial Protocols

• Adding Deterministic I/O to NI PACs

• Connecting NI Devices to Industrial Protocols• Modbus TCP/IP

• Plug-In PXI/PCI Devices, PROFIBUS

• Ethernet/IP

Page 3: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Agenda

• Why Ethernet-Based Protocols?

• Overview of Ethernet-Based Industrial Protocols

• Adding Deterministic I/O to NI PACs

• Connecting NI Devices to Industrial Protocols• Modbus TCP/IP

• Plug-In PXI/PCI Devices, PROFIBUS

• Ethernet/IP

Page 4: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

4

Why Ethernet-Based Protocols?

Modbus TCP/IP

Traditional Industrial

Protocols

PROFINETPROFIBUS

DeviceNet Ethernet/IP

Modbus

Ethernet Physical

Layer

CANopen EtherCAT

Page 5: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Industrial Ethernet Adoption

• Total market $630 M

• Ethernet really means:

– Ethernet/IP

– PROFINET

– Modbus TCP/IP

Expected Trends in Type of Wireline Infrastructure Networks

being used in Industrial Facilities

Source: VDC 2006

Page 6: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Agenda

• Why Ethernet-Based Protocols?

• Overview of Ethernet-Based Industrial Protocols

• Adding Deterministic I/O to NI PACs

• Connecting NI Devices to Industrial Protocols• Modbus TCP/IP

• Plug-In PXI/PCI Devices, PROFIBUS

• Ethernet/IP

Page 7: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Industrial Ethernet and OSI Model7. Application

6. Presentation

5. Session

4. Transport

3. Network

2. Data Link

1. Physical

Modbus TCP/IP,

Ethernet/IP,

PROFINET, and

EtherCAT,

TCP and UDP

IP

Ethernet

Page 8: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Industrial Ethernet protocols are not all just

“Ethernet.” They add features for reliability and

determinism and the trade-off is compatibility

with standard Ethernet.

Page 9: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet-Based Industrial Protocols

• Modbus TCP/IP

• EtherCAT

• Ethernet/IP

• PROFINET

Page 10: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Similarities

• Reuse OSI model layers 1 and 2

– What about the other 5 layers?

• Define master (scanner) and slave (adapter)

devices

• Address 1 or more target applications

– Non Real Time

– Real Time

– Hard Real Time

Page 11: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Application Targets

• Non Real Time

– Uses standard TCP/IP or UDP/IP

– Application: PLC to HMI or PLC to SCADA

• Real Time

– Provides added determinism with COTS hardware

– Application: Control data

• Hard Real Time

– Adds specific hardware to deliver determinism

– Application: Distributed motion

Page 13: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet-Based Industrial Protocols

• Modbus TCP/IP

• EtherCAT

• Ethernet/IP

• PROFINET

Page 14: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Modbus TCP/IP Overview

• First industrial protocol on Ethernet (introduced 1999)

– Based on Modbus developed by Modicon in 1979

– Widely adopted and opened Ethernet standard

• Advantages

– Uses standard Ethernet (hardware and TCP/IP transport layer)

– Open and relatively simple

• Disadvantages

– Not a hard real-time protocol

– Does not deliver determinism

Page 15: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Modbus Data Items

Data Item Data TypeModbus Modbus Slave

Description ExampleRead Write Read Write

000001–065535 Boolean value Yes Yes Yes Yes Accesses single-bit coils. 000001 = {000001}

100001–165535 Boolean value Yes No Yes Yes Accesses single-bit discrete inputs. 100002 = {100002}

300001.1–365535.16 Boolean value Yes No Yes YesAccesses individual input register bits and interprets

them as logical TRUE or FALSE values. The least

significant bit is 1. The most significant bit is 16.

300001.1 = {the first

bit of 300001}

300001–365535

16-bit

unsigned

integer

Yes No Yes YesAccesses 16-bit input registers as unsigned integers

ranging from 0 to 65,535.300001 = {300001}

400001.1–465535.16 Boolean value Yes Yes Yes YesAccesses individual bits of holding registers and

interprets them as logical TRUE or FALSE values. The

least significant bit is 1. The most significant bit is 16.

400002.16 = {the

16th bit of 400002}

400001–465535

16-bit

unsigned

integer

Yes Yes Yes YesAccesses 16-bit holding registers as unsigned integers

ranging from 0 to 65,535.400002 = {400002}

Page 16: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet-Based Industrial Protocols

• Modbus TCP/IP

• EtherCAT

• Ethernet/IP

• PROFINET

Page 17: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

EtherCAT Overview

• EtherCAT – Ethernet Control Automation Technology

– Managed EtherCAT Technology Group (ETG)

– Open and based on standards such as IEC 61158

• Advantages

– Hard real-time industrial protocol

– Extremely efficient and straightforward communication

• Disadvantages

– Addresses only hard real time (?)

– Not designed for standard TCP/IP packets and EtherCAT packets

Page 18: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Functional Principle: Ethernet On-the-Fly

Fast Train Analogy

• “Train” (Ethernet frame) does not stop

• Even when watching the “train” through a narrow window one sees the entire train

• “Car” (subtelegram) has variable length

• One can “extract” or “insert” single “person” (bits) or entire “groups” – even multiple

groups per train

MasterSlave Slave Slave Slave

18

Page 19: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet Frames• EtherCAT commands are transported in the Ethernet frame data area

and coded via a special EtherType– EtherType is limited to an Ethernet subnet (not relayed by routers)

Page 20: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet-Based Industrial Protocols

• Modbus TCP/IP

• EtherCAT

• Ethernet/IP

• PROFINET

Page 21: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

EtherNet/IP Overview

• Dominant bus for Rockwell Automation– Managed by Open Device Vendors Association (ODVA)

– Extends DeviceNET concepts to Ethernet

• Advantages

– Uses Ethernet transport layer (TCP and UDP)

• Disadvantages

– Can overload networks with UDP messages if note correctly

configured, recommend managed switches with IGMP snooping

Page 22: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Device Classes

• “Slave”

• Only sends data if requested by a scanner

• Supports explicit and implicit messagingAdapter Class

• “Master”

• Initiate implicit and explicit communicationsScanner Class

• Used for setup or on-demand data transfer

• Initiates data transfer by either deviceMessaging Class

Page 23: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

EtherNet/IP Add-Ons

CIP Sync

• Based on IEEE 1588

• Provide shared clock to devices

CIP Motion

• Builds on CIP Sync to perform distributed control for motion

• Uses clock sharing not QoS

CIP Safety

• Builds on DeviceNet safety

• Intelligent devices with time-out parameters

Page 24: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet/IP Terminology

• TCP/IP

• Used to set parameters and initiate implicit communication

Explicit Messages

• UPD/IP multicast

• Used to communicate I/O data

• Normally set up for cyclical updatesImplicit Messages

Page 25: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Communication from NI LabVIEW to

ControlLogix PLCs

EtherNet/IP

Available for download from NI Labs at ni.com/labs

Page 26: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

EtherNet/IP VIs for LabVIEW

• Provides VIs for communication to “Logix” PLC tags

– Directly read and write tags on Allen-Bradley

ControlLogix and CompactLogix PLCs

• Runs on LabVIEW for Windows and LabVIEW

Real-Time OSs (Phar Lap and VxWorks)

• Explicit messaging

• Good for low numbers of tags

Page 27: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Use on Real-Time Controllers

• Need to install the communications drivers onto the

real-time target from NI Measurement & Automation

Explorer

Page 28: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

EtherNet/IP VIs for LabVIEW

• Advantages

– Simple method to communicate to Rockwell PLCs

– LabVIEW initiated communication (no need to change PLC code)

– Good for communicating low number of tags

– Uses TCP/IP and does not require IGMP snooping to prevent

network flooding

• Disadvantages

– Not recommended for high tag counts

• Inefficient packing of data into Ethernet (slower communication)

• Increased processor burden on PLC

– Can only communicate to Rockwell Logix PLCs

• No SLC support, no third-party EtherNet/IP device support

Page 29: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet-Based Industrial Protocols

• Modbus TCP/IP

• EtherCAT

• Ethernet/IP

• PROFINET

Page 30: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

PROFINET Overview

• Dominate bus for Siemens– Application protocol that extends PROFIBUS to Ethernet

– Managed by PROFIBUS & PROFINET International (PI)

• Advantages

– Supports both standard and deterministic Ethernet traffic

– Uses IEEE 1588 and QoS to add determinism

• Disadvantages

– For RT/IRT managed switch with QoS is recommended

– Switch with ERTEC ASIC for most challenging applications

Page 31: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Three Levels

• Non Real Time (NRT) – PROFINET CBA

– For plant commissioning

– 100 m/s range

• RT (Real Time) – PROFINET CBA and PROFINET I/O

– I/O applications

– Up to 10 m/s cycle times

• IRT (Isochronous Real Time)– PROFINET I/O

– Applications in drive systems

– Less than 1 m/s cycles timeSource:

Wikipedia

Page 32: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

PROFINET Network cycle• No “start period” message

– Clock synchronization via IEEE 1588 and asynchronous

• Red portion of the cycle (isochronous)

• Green portion of the cycle (asynchronous) – minimum 125 s

Page 33: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

IEEE 1588 Technology

• Technology to synchronize distributed clocks

• Accuracy based on clock jitter

Page 34: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

IEEE 1588 Technology

Page 35: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

HRT: Determinism and Performance

Organization Response Time (ms)

Jitter(us)

Data Rate(Mb/s)

EtherCAT ~ 0.1 < 0.1 100Sercos III < 0.5 < 0.1 100

PROFINET IRT < 1 < 1 100Ethernet Powerlink < 1 < 1 100

Ethernet/IP ~ 1 < 1 100Table 1. Real-Time Comparison of the Various Real-Time Methods

Standards-Based Real-Time Ethernet Now Off-the-Shelf by Klaus Zwerina

Page 36: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Agenda

• Why Ethernet-Based Protocols?

• Overview of Ethernet-Based Industrial Protocols

• Adding Deterministic I/O to NI PACs

• Connecting NI Devices to Industrial Protocols• Modbus TCP/IP

• Plug-In PXI/PCI Devices, PROFIBUS

• Ethernet/IP

Page 37: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Host Computer

(TCP/IP) NI PXI System

with Ethernet Interface

NI cRIO-9074

NI 9144

NI System with Deterministic Distributed I/O

(EtherCAT)

(TCP/IP)

(EtherCAT)

NI cRIO-9074

NI PXI System

with Ethernet Interface

NI 9144

Page 38: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

NI Master Controllers

• Requirements

– NI CompactRIO or PXI real-time system with two

Ethernet ports

– NI-Industrial Communications for EtherCAT

Page 39: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

NI 9144 Expansion Chassis

Two ports for

daisy chaining

Eight slots

for

NI C Series

Rugged Chassis• -40 to 70°C

• 9 to 30 V input

• HazLoc

• Shock/vibe

Page 40: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

LabVIEW Experience

{{

CompactRIO

Chassis

NI 9144

Expansion

Chassis

Page 41: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Deterministic

Distributed I/O

Demo

Page 42: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

C Series I/O

EASY POWERFUL OPEN

• Supports more than 30 analog and digital modules

– All single-point measurements

– No waveform support (NI 9233 and NI 9234)

• Module-to-module and chassis-to-chassis

synchronization

• Compatibility with different NI chassis

Page 43: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Agenda

• Why Ethernet-Based Protocols?

• Overview of Ethernet-Based Industrial Protocols

• Adding Deterministic I/O to NI PACs

• Connecting NI Devices to Industrial Protocols• Modbus TCP/IP

• Plug-In PXI/PCI Devices, PROFIBUS

• Ethernet/IP

Page 44: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

LabVIEW Modbus Options

NI Modbus VIs Modbus I/O Server

Page 45: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Modbus TCP

Modbus: Connect to Third-Party Gateways• Wide variety of communication protocols

• Supported by all LabVIEW Real-Time PACs

• Not for deterministic applications

PROFIBUSDeviceNetEthernetIPControlNet

Page 46: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

PXI/PCI with Real-Time Support

• PROFIBUS

• CAN

• CANopen

• DeviceNet

• FOUNDATION fieldbus

Page 47: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

PROFIBUS

• Compatible with Windows XP/2000, LabVIEW Real-Time OSs

• Graphical networking configuration software

• LabVIEW Express API for simplified programming

• Supported services include DPV0 Master class 1/2, DPV0 Slave, and

DPV1 Master class 2

Page 48: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Ethernet/IP VIs for LabVIEW

• VIs for Ethernet/IP message and scanner modes

• Available on NI Labs

• Installer that provides VIs for communication to

Ethernet/IP adapters

Page 49: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Demo: Ethernet/IP VIs

Page 50: Ethernet-Based Industrial Communication Protocols …download.ni.com/pub/events/nits/presentations/2008/ethernet... · •Overview of Ethernet-Based Industrial Protocols ... •Supports

Questions?