35
Connect LabVIEW to Any Industrial Network and PLC National Instruments Technical National Instruments Technical Symposium 1

jogiedited Connect LabVIEW to Any Industrial Network …download.ni.com/pub/events/nits/presentations/2007/industrial... · Connect LabVIEW to Any Industrial Network and PLC National

Embed Size (px)

Citation preview

Connect LabVIEW to Any Industrial Network and PLC

National Instruments Technical National Instruments Technical Symposium

1

Agendag

• Industrial Communications Overview• Why Connect NI LabVIEW to Industrial Networks and

PLCs?PLCs?• Basic Analog and Digital I/O

N ti I d t i l N t k C i ti• Native Industrial Network Communication• OPC with LabVIEW DSC

2

What Are Industrial Networks?

• Similar to how Ethernet connects Common Industrial Networks

•DeviceNet

computers and printers• Industrial communications

•PROFIBUS

•Modbus TCP

•Modbus SerialIndustrial communications connect industrial devices such as PLCs, sensors, and actuators

•CANopen

•FOUNDATION fieldbus

•Interbusas PLCs, sensors, and actuators •Interbus

•CC-Link

•LonWorks

•HART

•PROFINET

•Ethernet/IP

3

Why Connect NI LabVIEW to Industrial Networks and PLCs?Networks and PLCs?

High-speed analog measurementsHigh-resolution analog measurements Advanced analysis (digital filtering, frequency analysis) y ( g g y y )Custom hardware performance with FPGA technology

• High-speed closed-loop control• FPGA-based processing and analysis

Data loggingEnterprise connectivity (Web publishing, database)

4

3 Methods to Connect LabVIEW to Any PLCyBasic I/O

Analog/Digital

Industrial

CommunicationsCommunications

OPC

PLCsNI PACs

5

Basic I/O – Cheap, Easy, Fast, and Effectivep, y, ,

• Available on every platformy p• Analog and digital I/O options• PLC users can easily integrate analog and digital I/O • PLC users can easily integrate analog and digital I/O

into their ladder logic codeAll NI PAC t t i t lli t d i • Allows NI PACs to act as intelligent devices

6

Basic I/O

• AdvantagesgFast, deterministic, little or no software overhead

• ConsiderationsConsiderationsDoesn’t scale wellPoint-to-point wiring (parallel) Point-to-point wiring (parallel) Can’t communicate lots of data

7

Example – Automated Filling of Aerosol CansCans• Existing Allen-Bradley PLC system was being

f fused to automate the filling of aerosol cans• PLC did not have the capability to do high-

d l f tspeed analog for pressure measurements• CompactRIO was used for high-speed

pressure measurements on 8 channels (2 k per pressure measurements on 8 channels (2 k per channel)

• CompactRIO and Allen-Bradley PLC were CompactRIO and Allen Bradley PLC were integrated using digital I/O

8

9

3 Methods to Connect LabVIEW to Any PLCyBasic I/O

Analog/Digital

OPC

Industrial PLCsNI PACs

Industrial

Communications

10

What Is OPC?• Universal language for

reading and writing English

Speaker: “Hello!”

English Speaker: “Hello!”

reading and writing data

• OPC Client: Read

Windows PC

“Hello!” “Hello!” OPC Client: Read and write to OPC

• OPC Server: English

Spanish T l t

German T l t

French T l t

OPC Server:Translates between OPC and device-

TranslatorSpanish Speaker

TranslatorGerman Speaker

TranslatorFrench

Speaker

specific protocols

11

p p p

NI LabVIEW DSC OPC Client

Windows PCAllen-BradleyOPC Server

Windows PC

Ethernet/IP

OPCClient

OPC Server

SiemensOPC Server

PROFINET LabVIEWDSCClient

MitsubishiOPC ServerCCLink

PLCs Device-Specific OPC Server OPC Client

OPC Driver

12

OPC ServerDriver

What Is the LabVIEW DSC Module?• Makes LabVIEW an OPC client

Add f t t h d i bl• Adds features to shared variablesLoggingAlarmingAlarmingEvent monitoringScalingScaling

• Real-time and historicaldata trendingg

• System security• Extensive industrial graphics library

13

g p y

NI OPC Servers for Third-Party PLCsy• New for LabVIEW 8.5

Add OPC f h 100 PLC• Adds OPC support for more than 100 PLCs• Connects with LabVIEW DSC OPC client

Evaluation version included with DSC

• Servers included for:•Allen-Bradley•AutomationDirect•Cutler-Hammer

•Modbus•Omron•Philips

•WAGO•Yaskawa•YokogawaCutler-Hammer

•GE•Hilscher

Philips•Siemens•Toshiba

Yokogawa•…and more!• ni.com/opc

14

OPC

• AdvantagesgMost universalLeast device-dependentpIdeal for HMI and SCADA applications

• Considerations• ConsiderationsSlower, not deterministic, single-point onlyCan require PC based OPC serversCan require PC-based OPC serversNot for safety or critical communications

15

Demo: Connecting LabVIEW to anDemo: Connecting LabVIEW to anAllen-Bradley MicroLogix PLC with OPC

Windows PC

Allen-Bradley DF1

OPC SDF1Allen-Bradley

MicroLogix PLCSerial

OPC Server

NI OPC ServerMicroLogix PLC LabVIEW DSCNI OPC Server

16

ABCO Adds LabVIEW to PLC Systemy

• ABS brake testing system“The ease by which NI can speak to the Allen-Bradley hardware saved me g y

• PXI for high-speed encoder measurements

valuable time on this delivery-critical job.” -Arif Bustani, electrical engineer ABCOmeasurements

• Added to existing Allen-Bradley PLC assembly lineassembly line

• OPC used for communication bet een PXI and Allen Bradle PLCsbetween PXI and Allen-Bradley PLCs

17

3 Methods to Connect LabVIEW to Any PLCyBasic I/O

Analog/Digital

OPC

I d t i l PLCsNI PACs

Industrial

Communications

18

Methods for Industrial Communications

Modbus over Eth t/S i l

Plug-In Interfaces

Modbus Gateways over Ethernet/SerialInterfaces Gateways over Ethernet, Serial

VersatilityPerformance/Determinism

19

Plug-In Communication Boards Plug-In Interfacesg

• CAN and CANopen

Interfaces

p• DeviceNet• FOUNDATION fieldbus• FOUNDATION fieldbus• Serial (RS232, RS422, RS485)• Third-party PROFIBUS (Comsoft)• Support for PXI, PCI, PCMCIA, and pp

CompactRIO (CAN)

20

Plug-In Communication Boards Plug-In Interfacesg

• Advantages

Interfaces

gDirect, deterministic communication with the processorTiming and synchronization with other I/O (DAQ)g y ( Q)High-level API support for LabVIEW and other programming languagesp g g g g

• ConsiderationsMany smaller buses and protocols are not supportedMany smaller buses and protocols are not supportedOnly available on PC and PXI (real-time supported)

21

CANopen LabVIEW Libraryp y

• Works with PCI, PXI, and PCMCIA high-speed NI g pCAN interfaces

• Turns them into CANopen master interfaces Turns them into CANopen master interfaces • Fully compliant with CiA DS301 standard

C l t th NI S ftM ti C t ll f C l • Complements the NI SoftMotion Controller for Copley CANopen distributed motion drives

22

DeviceNet Master Interfaces

• Available in PCI, PXI, and PCMCIA• Deterministic control using LabVIEW Real-Time• Master (scanner) and slave protocols for complete • Master (scanner) and slave protocols for complete

access to DeviceNet networks500 V ti ll i l t d h i l l• 500 V optically isolated physical layer

• Onboard processor • NI-DNET driver software included

23

PROFIBUS

• PROFIBUS master/slave for PXI and PCI

• SiemensSiemens• More than 2 million nodes

P l i E d A i• Popular in Europe and Asia• Recommended: Comsoft DF PROFI II

interfaces

24

Modbus TCP and Serial Communication

Modbus over E h /S i lCommunication

• Modbus TCP is the most common industrial protocol Ethernet/Serial

pbased on Ethernet

• Simple protocol that reads and writes to registersSimple protocol that reads and writes to registers• Native support with LabVIEW 8.x (DSC and Real-

Time)Time)• LabVIEW 8.5 introduces 32-bit addressing• LabVIEW and PACs can function as slave and

master

25

PEM2

Slide 25

PEM2 And serial?Paul Mandeltort, 7/24/2007

Modbus Connectivity Options

Modbus over Eth t/S i lOptions

Slave Master

Ethernet/Serial

Slave(Connected to Sensors)

Master(HMI and Control)

Compact FieldPoint LabVIEW LabVIEW

RT (PACs) LabVIEWLabVIEW DSC & RT

(PACs)

cFP 1808 Modbus

( )

I/O Modbus

(PACs)

I/O cFP-1808, cFP-1804

Modbus Library

I/O Servers

Modbus Library

I/O Servers

26

Modbus Connectivity Options

Modbus over Eth t/S i lOptions Ethernet/Serial

• AdvantagesgGood mix of performance and compatibilityCheap – works with standard Ethernet and SerialpStandardized – Not committed to a PLC brand

• Considerations• ConsiderationsNo determinismSlower than direct interfaces extra software layers Slower than direct interfaces – extra software layers

27

Demo: LabVIEW as a Modbus MasterDemo: LabVIEW as a Modbus Master

28

Third-Party Gateways Modbus Gateways over y y

• Wide variety of communication buses and protocols

yEthernet, Serial

y psupported

• Ethernet or serial-basedEthernet or serial based• Perfect for non-PXI, PCI, and PCMCIA systems

PROFIBUSDeviceNet

Ethernet

DeviceNetEthernetIPControlNet

29

Example: Adding Vision for Food Processing OptimizationProcessing Optimization• Needed NI Compact Vision System to calculate the

mass/volume of the food item coming through on the conveyor belt

• Cognex and DVT software too basic• Ethernet/IP connectivity was a requirement Ethernet/IP connectivity was a requirement

EthernetIPModbus TCP

30

Summaryy

• Basic Analog and Digital I/Og g• OPC• Native Industrial Communications• Native Industrial Communications

31

Communication Buses and Protocols Home Pageni.com/comm

32

AppendixAppendix

33

OPC Servers for NI Hardware and SoftwareSoftware

Windows PC

Shared Variable

Windows PC

OPC Server

DAQmx OPC

PSP

DAQ OPC

ServerDAQmx

Compact FieldPoint OPC SEthernet

Client

OPC Server

34