Connect National Instruments LabVIEW to Any Industrial Network or PLC
Table of Contents
National Instruments programmable automation controllers (PACs) and NI LabVIEW can add a wide range of advanced functionality to existing PLC systems. You can use NI PACs and LabVIEW to optimize automation systems for high-speed and high-resolution analog measurements combined with advanced analysis for machine condition monitoring, custom hardware performance with FPGA technology, and vision applications for final part inspection, just to name a few. To ensure total system performance and completion, communication between the two systems is extremely important and must be simple, effective, and often deterministic. This white paper covers the different methods you can use to connect LabVIEW to any industrial network and PLC system.
Digital and Analog I/O
Perhaps the easiest way to integrate NI PACs with existing PLCs is through basic digital or analog I/O. With digital I/O, you can communicate data using a variety of methods. The most basic method is toggling a single digital line, where you can send one bit of data for status or pass/fail information, for example. If you need to output more information, such as error codes or large numbers, or to implement hand-shaking, you can use multiple digital I/O lines or ports. You can also generate pulses across a digital line for precision timing and triggering of your automation devices, such as actuators, PLCs, and more. One distinct advantage of using digital I/O is that all National Instrument PAC platforms are available with digital I/O.
Figure 1. Digital I/O is the easiest and fastest method to integrate a PAC and PLCs.
With analog I/O, you can pass a much larger amount of data using a single line. With a 16-bit digital-to-analog converter (DAC), you can send 65,000 distinct values across a single line. Analog I/O is useful for sending incremental changes for a specific value and using minimal wires. One of the disadvantages of using analog I/O for communication is the possibility of noise and compromised signal integrity. If your PAC or PLC system is on the factory floor, there may be a lot of noise that could change the value of the signal you are trying to read or write. Using isolated data acquisition products helps protect your data from ground loops, voltage spikes, and noisy environments.
Industrial Communications
PLCs typically use industrial networks as the main form of communication between all of the different components in the system, letting controllers, sensors, actuators, and transducers share data with each other on a single bus. Depending on the type of PLC you use, there are hundreds of different protocols and networks for industrial networks, ranging from simple protocols implemented on top of basic serial ports to high-speed, deterministic networks based on Ethernet. There are three main methods that you can use to communicate directly to industrial networks with LabVIEW – native Modbus communication, plug-in communication modules, and Ethernet-based gateway products.
Modbus TCP and Serial
The most common Ethernet-based industrial network is Modbus TCP. LabVIEW provides native Modbus TCP and serial compatibility on any Ethernet or serial port with either the LabVIEW Real-Time Module or the LabVIEW Datalogging and Supervisory Control (DSC) Module. With either of these modules installed, you can take advantage of an interactive, configuration-based utility to easily create Modbus TCP and serial master and slave applications. You can easily read and write data to Modbus devices with the LabVIEW project, creating variables that are bound to specific Modbus registers. If you are using an older version of LabVIEW or do not have the LabVIEW Real-Time or DSC modules, you can use the Modbus Library for LabVIEW, which provides a set of lower-level
Plug-In Communication Interfaces
When using a standard desktop computer or a PXI chassis, you can take advantage of the available PCI or PXI slots for plug-in communication boards. With the wide variety of National Instruments plug-in communication interfaces available, you can connect your PC or PXI system directly to some of the most common industrial networks on the market. With plug-in communication boards, you can take advantage of direct, deterministic communication with the processor, and high-level functions for rapid application development. National Instruments offers plug-in communication boards for PCI, PXI, and PCMCIA for industrial networks including CAN, DeviceNet, CANopen, serial (RS232, RS422, and RS485), and Foundation fieldbus. In addition, other industrial networks, such as Profibus, are supported by third-party plug-in boards and are often available with LabVIEW and LabVIEW Real-Time drivers.
Gateways
For NI PACs without PCI and PXI expansion slots, third-party gateways are a great way to connect LabVIEW to industrial networks. Because all NI PACs have a built-in Ethernet port, you can use the native Modbus TCP support in LabVIEW to incorporate third-party gateways that convert Modbus TCP to a wide variety of industrial networks. This, in turn, connects NI PACs to any network.
Figure 2. NI PACs can connect directly to industrial networks with plug-in interfaces, gateways, and I/O servers.
OPC
OLE for process control (OPC) has become the de facto industry standard for transferring data between various PLCs and HMI/SCADA systems. You can easily connect to any OPC 3.0 or 2.x compliant server with the LabVIEW DSC Module, which provides OPC client functionality to any LabVIEW application. You can also publish LabVIEW data directly as an OPC item using the built-in OPC server functionality in LabVIEW and Compact FieldPoint drivers.
Summary
You can use LabVIEW and NI PACs to add advanced measurement and analysis functionality to existing PLC systems and to optimize automation systems with vision, high-speed, and high-resolution analog measurements as well as advanced analysis and math for data. You can seamlessly integrate NI PACs and PLC systems using a wide range of options, including digital and analog I/O, communicating directly on industrial networks, and OPC.
For more detailed information about how to connect LabVIEW to any industrial network, read the white paper “Connect LabVIEW to Any Industrial Network or PLC.”
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).


