PLCs, DCSs & Controllers


PLC and FPGA to solve machine automation problems

October 2006 PLCs, DCSs & Controllers

Machine automation systems have become very complex to achieve better throughput, faster changeover times, reduced waste, and lower downtime. Today's automation systems require various functionality, such as predictive maintenance, intelligent fault handling, fast response times, or custom control algorithms, in addition to logic or process control. This functionality is difficult to implement in traditional PLC-based architectures. Today's machines need a combination of embedded and PLC technologies to deliver the expected functionality and performance. This article examines how a PLC works and explores FPGA technology with its parallel processing architecture, as well as applications for high-performance machine control.

PLC scanning architecture

A PLC typically operates in accordance with the IEC-61131-3 specification. This specification, developed by the International Electrotechnical Commission, details the guidelines for the operating system execution, data definitions, programming languages, and the instruction set a PLC uses. Unlike in the PC world, where one C program works well on any computer, in the PLC world, every vendor has its own flavour of an IEC 61131-3 compliant specification. However, the basic architecture of the system remains the same.

To illustrate, let us take a quick look at how a PLC operates. If you want to toggle an LED every second, your PLC program has three components to help you do this: program logic, memory map, and I/O scan. For program logic, you write out a value TRUE to a variable you call 'LEDValue'. This variable resides in the memory map. The I/O scan then transmits a binary equivalent of the value in memory to the physical I/O line, your LED turning on or off. Thus, the memory map acts as the link between your program logic and the I/O scan. Because your program logic and I/O scan are decoupled, you can do a variety of things, such as force I/O on to the memory map when debugging in the field or updating a program on the fly when the I/O scan is still running. However, you need to keep certain things in mind when programming PLCs, such as not having any blocking function that may cause the program logic to indefinitely halt.

Sequential and reactive programming architectures

The scanning architecture in Figure 1 is excellent for controlling sequential processes - turn the conveyor on, if the proximity sensor goes high, then turn the conveyor off and turn it on again after the proximity sensor goes low. However, modern machines are more complex and more reactive in nature. A typical packaging machine today devotes 20% of the program to the logic for normal operation and 80% for fault handling. It needs a combination of sequential and reactive programming architectures to accomplish control for such complex machines.

Figure 1. Scanning architecture of a PLC
Figure 1. Scanning architecture of a PLC

Programmable automation controllers, such as NI CompactRIO, incorporate embedded technologies, such as field-programmable gate arrays (FPGAs), for implementing reactive architectures (see Figure 2). In addition to the FPGA, there exists a floating point processor running a realtime operating system you can use to program sequential tasks, such as those in a PLC. PACs combine the best of embedded and PLC technologies to offer an ideal architecture for programming complex machines.

Figure 2. Programmable automation controllers, such as NI CompactRIO, combine the best of both PLC and embedded technologies to solve complex machine automation problems
Figure 2. Programmable automation controllers, such as NI CompactRIO, combine the best of both PLC and embedded technologies to solve complex machine automation problems

The case for FPGA technology

While engineers often use FPGAs in industrial control products as an internal component, they have not had access to FPGA functionality. Defining FPGAs has historically required expertise using HDL programming or complex design tools used more by hardware design engineers than by control engineers. With PACs, such as CompactRIO, you can use National Instruments' LabVIEW, a high-level graphical development environment designed specifically for measurement and control applications, to create control systems that incorporate reactive behaviour with fast response rates. Because LabVIEW configures custom circuitry in the FPGA, your system can process and rapidly and deterministically generate synchronised analog and digital signals, which you cannot achieve using the PLC execution architecture. With the FPGA, you can execute digital logic at 20 MHz, analog closed-loop control at 1 MHz, and achieve servo update rates of 200 kHz per axis for motion control.

Programming an FPGA-based PAC with LabVIEW

When you target an FPGA-based device, such as NI CompactRIO, NI Compact Vision System, or NI R Series PCI/PXI data acquisition devices, LabVIEW displays only the functions you can implement in the FPGA. The LabVIEW FPGA Module functions palette includes typical LabVIEW structures and functions, such as While Loops, For Loops, Case Structures, and Sequence Structures as well as a dedicated set of LabVIEW FPGA-specific functions for maths, signal generation and analysis; linear and nonlinear control; comparison logic, array, and cluster manipulation; occurrences; analog and digital I/O; and timing. You can use a combination of these functions to define logic and embed intelligence onto your FPGA-based device.

Figure 3 shows the block diagram for a 32-bit counter, pulse generator, and a PID control loop implemented in LabVIEW FPGA. Following the data flow makes it easy to understand the behaviour of this program. For example, to create the counter, you continuously read from a digital line and compare the line status from one iteration to the next. The counter increments by one when the digital line state changes.

Figure 3. Programming an FPGA is easy with the LabVIEW graphical development environment
Figure 3. Programming an FPGA is easy with the LabVIEW graphical development environment

Customising the counter or creating additional functionality is merely a matter of changing the LabVIEW code. Unlike traditional PC or PLC processors, FPGAs are parallel processors and adding additional loops to your application does not affect the performance of other independent loops. In this example, the counter and the PID loop execute in parallel on the FPGA - no multitasking as in PLCs or PCs.

The PID function block is just one example of intellectual property (IP) available for programming your FPGA in LabVIEW. For complex, high-speed monitoring and control applications, you can use signal processing IP from a variety of sources. The NI SoftMotion Development Module includes enhanced algorithms for motion control and built-in inputs for a variety of feedback devices including quadrature encoders. The NI Digital Filter Design Toolkit provides functions and interactive tools for design, analysis, and implementation of digital filters within LabVIEW FPGA. Additionally, you can link custom VHDL or Verilog IP into a LabVIEW FPGA block diagram using the HDL interface node.

Adding floating point capabilities to FPGA-based PACs

PACs, such as NI CompactRIO, have a combination of a floating point processor running a realtime operating system and an FPGA running logic in hardware. You can use LabVIEW Real-Time to create programs that execute on the floating point processor and communicate with the FPGA. You also can use the program running on the floating point processor to perform complex floating-point calculations, datalogging, networking, e-mail, File Transfer Protocol (FTP), remote Web control, and any operations that do not fit within the FPGA fabric. LabVIEW Real-Time systems deliver deterministic processing engines for functions performed synchronously or asynchronously to the FPGA. For example, floating-point arithmetic, including spectral analysis or custom control algorithms are often performed in the LabVIEW Real-Time environment. You can store relevant data on a LabVIEW Real-Time system or transfer it to a Windows host computer for off-line analysis, datalogging, or user interface displays. The architecture for this configuration is shown in Figure 4.

Figure 4. Architecture of an FPGA-based PAC – NI CompactRIO.
Figure 4. Architecture of an FPGA-based PAC – NI CompactRIO.

Each FPGA-based device has flash memory available to store a compiled LabVIEW FPGA program and run the application immediately after power up of the device. In this configuration, as long as the FPGA has power, it runs the FPGA program, even if the host computer crashes or is powered down. This is ideal for programming safety power down and power up sequences when unexpected events occur.

Applications using FPGA-based PACs

When it comes to very high speed sorting, implementing custom control algorithms, such as Model-Free Adaptive control, performing high-speed realtime analysis and control, or fast event response, FPGA-based PACs are an ideal choice for implementing machine control systems. For example, Mink Hollow Systems in Highland, MD, used LabVIEW FPGA technology to tightly synchronise the high-speed valve operation of a solid-state hydraulic actuator. The Servo Systems Technology Group at BAE Systems, UK, used LabVIEW FPGA technology to develop field-oriented control of a three-phase brushless permanent magnet motor. Process Automation in Belle Mead, NJ, used FPGA-based NI CompactRIO to acquire high-speed analog data on multiple channels, run custom processing algorithms, and provide deterministic control to operate its new verifiable fastener installation tool.

Incorporating embedded technologies, such as FPGAs, with parallel, reactive architectures effectively complement the sequential processing offered by PCs and PLCs for next generation automation systems.

What is an FPGA?

An FPGA is a chip that consists of many unconfigured logic gates. Unlike the fixed, vendor-defined functionality of an ASIC (application-specific integrated circuit) chip, you can configure and reconfigure the logic on FPGAs for your specific application. Engineers use FPGAs in applications where either the cost of developing and fabricating an ASIC is prohibitive, or the hardware must be reconfigured after it is placed into service. The flexible, software-programmable architecture of FPGAs offer benefits such as high-performance execution of custom algorithms, precise timing and synchronisation, rapid decision making, and simultaneous execution of parallel tasks. Today, FPGAs appear in a variety of devices, including instruments, consumer electronics, automobiles, aircraft, copy machines, and application-specific computer hardware.

For more information contact National Instruments, 0800 203 199, ni.southafrica@natinst.co.za, ni.com/southafrica





Share this article:
Share via emailShare via LinkedInPrint this page

Further reading:

Siemens launches new generation of logic controller
Siemens South Africa PLCs, DCSs & Controllers
Siemens has launched the latest generation of its proven intelligent logic controller, LOGO! 9. This enables simple implementation of small automation projects.

Read more...
DCS for maximum plant efficiency and reliability
ABB South Africa PLCs, DCSs & Controllers
ABB has introduced SPR2025, the latest Symphony Plus DCS package release to enable modernisation and efficient performance for the process and power industries.

Read more...
Future-proof automation
Vepac Electronics PLCs, DCSs & Controllers
The highly adaptable SALZ control system consists of open hardware, modular engineering software based on a virtualisation concept and an integrated app store.

Read more...
Robust PLC for field applications
ifm - South Africa PLCs, DCSs & Controllers
ifm is a leading suppliers of robust control systems for mobile use. Its ecomat series comprises PLCs, I/O modules and sensors that can withstand the harsh environmental influences of mobile applications.

Read more...
ABB’s new flagship DCS
ABB South Africa PLCs, DCSs & Controllers
ABB has launched the latest version of its flagship distributed control system, to help industrial operators modernise without disruption and accelerate their path toward next generation automation.

Read more...
Adroit Technologies drives global SCADA for Iochpe-Maxion
Adroit Technologies PLCs, DCSs & Controllers
Adroit Technologies has been appointed by Iochpe-Maxion, parent company of one of the world’s largest wheel manufacturers and producers of structural components in the Americas, as its global SCADA partner. The partnership will standardise operational visibility, reliability and control across 34 manufacturing facilities worldwide.

Read more...
Extended DCS enables industrial innovation with continuity
ABB South Africa PLCs, DCSs & Controllers
ABB has introduced its Automation Extended programme, a strategic evolution of its distributed control systems (DCS), designed to help industries modernise without disruption.

Read more...
Valmet’s automation powers world’s largest air-to-water heat pump
Valmet South Africa PLCs, DCSs & Controllers
Valmet will supply an automation system for Helen’s Patola air-to-water heat pump plant and two electric boilers currently being built in Helsinki, Finland. When completed, the air-to-water heat pump plant will be the largest in the world with a full heating production capacity around 30 MW.

Read more...
All eyes on the modern DCS platform
Schneider Electric South Africa PLCs, DCSs & Controllers
Modernised DCS platforms are no longer confined to hardware-dependent architectures. These systems have evolved to combine the strengths of both PLCs and DCS while adding capabilities that make them more open, resilient and collaborative.

Read more...
Automation solution for waste management at incineration facility
PLCs, DCSs & Controllers
Valmet is to deliver an automation system to Seongnam City’s incineration facility currently under construction in South Korea. By leveraging intelligent automation, the plant will optimise energy production, minimise emissions and deliver efficient, consistent performance throughout its entire lifecycle.

Read more...









While every effort has been made to ensure the accuracy of the information contained herein, the publisher and its agents cannot be held responsible for any errors contained, or any loss incurred as a result. Articles published do not necessarily reflect the views of the publishers. The editor reserves the right to alter or cut copy. Articles submitted are deemed to have been cleared for publication. Advertisements and company contact details are published as provided by the advertiser. Technews Publishing (Pty) Ltd cannot be held responsible for the accuracy or veracity of supplied material.




© Technews Publishing (Pty) Ltd | All Rights Reserved