Original Publish Date : 7/13/2006
Machine control beyond PLCs
Embedded processors handle the rising complexity of automation tasks by employing architectures that are quite different from those of programmable-logic controllers.

Rahul Kulkarni Product Manager,
Industrial Data Acquisition and Control
National Instruments Corp.
Austin, Tex.

The 32-bit counter, pulse generator, and PID controller represented by this control loop are actually implemented in an FPGA that is programmed with LabView. Unlike traditional PC or PLC processors, FPGAs are parallel processors. Additional loops do not affect the performance of other independent loops. In this example, the counter and the PID loop execute in parallel on the FPGA. There is no multitasking as in PLCs or PCs.


Programmable automation controllers such as the NI CompactRIO can handle highspeed control tasks by employing FPGAs. FPGA programming takes place using many of the same constructs available for ordinary processors. For example, the LabView FPGA function palette includes While loops, For loops, Case structures, and Sequence structures as well as specific functions for math, signal generation and analysis; linear and nonlinear control; comparison logic, array, and cluster manipulation; occurrences; analog and digital I/O; and timing.


Programmable-logic controllers execute a scanning algorithm that loops between a reading of inputs (usually contacts on I/O modules) and putting outputs into a state dictated by the sensed inputs. The process repeats indefinitely.

Programmable-logic controllers execute a scanning algorithm that loops between a reading of inputs (usually contacts on I/O modules) and putting outputs into a state dictated by the sensed inputs. The process repeats indefinitely.


It is no secret that machine-automation systems are growing more complicated. This trend arises from a need for what once were considered advanced functions: faculties for predictive maintenance, intelligent fault handling, and custom control algorithms that go beyond traditional logic or process control. It is tough to get these advanced functions out of ordinary programmable-logic controllers (PLCs) that have historically been used to make machines intelligent. So machine developers increasingly have begun using other kinds of control hardware that is better able to manage high-level machine tasks.

It is useful to examine how a PLC works as a way of illustrating why and under what circumstances designers should consider other approaches to control. In particular, some machine controls now incorporate FPGA (field-programmable gate-array) technology for its parallel processing capabilities. This approach can make sense when embedded control functions must handle real-time responses or complicated tasks that extend beyond simple interactions with input/output points.

PLC SCANNING
The thing to note about PLCs is that they repeatedly scan I/O points and take actions based on what they see. Historically, these devices have mimicked the ladder logic that once defined the interconnections of electromechanical relays that PLCs originally were designed to replace.

Today, however, PLCs typically operate in accordance with an international specification called IEC-61131-3. This document, developed by the International-Electrotechnical Commission, details the guidelines for using a number of programming languages besides ladder logic, as well as for other operating factors. These factors include the operating system execution, data definitions, and the instruction set a PLC uses. Unlike in the PC world, where one C program works well on any computer, each vendor in the PLC world has its own flavor of an IEC-61131-3-compliant specification. However, the basic architecture of the system remains the same.

To illustrate, consider a simple example of how a PLC operates. Suppose you want to toggle an LED every second. A PLC program has three components to help do this: program logic, memory map, and I/O scan. For program logic, you write out a value True to a variable you might call LEDValue. This variable resides in the memory map. An I/O scan function then transmits a binary equivalent of the value in memory to the physical I/O line, turning on or off the LED. Thus, the memory map acts as the link between the program logic and the I/O scan.

Note the program logic and I/O scan are decoupled. This relationship lets developers of PLC programs do a variety of useful things, such as force I/O onto the memory map when debugging in the field, or updating a program on the fly when the I/O scan is still running. However, PLC programming can still be tricky. For example, programmers must be mindful to never create code that works as a blocking function, which may force the program logic to indefinitely halt.

The scanning architecture found in PLCs is excellent for controlling such sequential processes as turning on a conveyor if a proximity sensor goes high, then turning it off after the proximity sensor goes low. Of course, modern machines are more complex and reactive than can be represented by mere sequences of events. A typical packaging machine today devotes 20% of its control program to the logic for normal operation and 80% to fault handling. It needs a combination of sequential and reactive programming architectures to control such complex machines.

There is another style of industrial control exemplified by devices called programmable-automation controllers (PACs). The term PAC is usually applied to controllers that can handle functions that PLCs can only manage through specialized add-on modules. PACs are also known for the use of an open architecture that makes it easy to expand the basehardware or make connections.

An example of a PAC is the NI CompactRIO. It incorporates such embedded technologies as FPGAs to implement reactive architectures. All in all, PACs combine the best of embedded and PLC technologies to create an architecture well suited for programming complex machines.

It is useful to review the role of FPGA chips in embedded applications delegated to PACs. The FPGA consists of many programmable logic gates and programmable interconnects. The programmable components can be configured to duplicate functions of logic gates and such combinatorial functions as decoders. Most FPGAs also carry memory elements or complete blocks of memories.

An FPGA can be interconnected by system designers in a manner resembling a single-chip programmable breadboard. The programming takes place after the manufacturing process to let the FPGA perform logical functions the application might need.

FPGAs are generally slower than ASICs of about the same complexity and aren't practical for supercomplicated designs. They also draw more power than ASICs. On the other hand, designs based on FPGAs can generally get to market faster than those incorporating ASICs. And FPGAs can be reprogrammed in the field to fix bugs. So engineers use FPGAs either where it is cost-prohibitive to develop and fabricate an ASIC, or where the hardware must be reconfigured after going into service. Today, FPGAs appear in a variety of devices that include instruments, consumer electronics, automobiles, aircraft, copy machines, and application-specific computer hardware.

Engineers often use FPGAs in industrial control products, but only as an internal component. Most controllers that incorporate FPGAs don't give access to them in a way that lets developers change how the controller interacts with the end application. The task of redefining FPGA functions has historically demanded expertise in HDL programming or use of complexdesign tools more familiar to hardware design engineers rather than to control engineers.

Recently developed PACs such as CompactRIO, however, have begun giving developers better access to FPGAs. FPGA functions in CompactRIO, for example, can be specified with the National Instruments LabView program. (As a quick review, LabView is a high-level graphical-development environment designed specifically for measurement and control applications.) Each FPGA-based device has Flash memory available to store a compiled LabView program and can run it immediately after power up.

Facilities in LabView now let engineers configure FPGA circuitry to generate synchronized analog and digital signals that would only be available from PLCs through use of specialized add-ons. With the FPGA, it is relatively easy for the CompactRIO to execute digital logic at 20 MHz, analog closed-loop control at 1 MHz, and get servo update rates of 200 kHz/axis for motion control.

FLOATING POINT
PACs such as NI CompactRIO generally have a floating-point processor running a real-time operating system. One reason is because FPGAs have no way of executing floating-point operations. So the floating-point processor may communicate with the FPGA while taking on tasks that don't lend themselves to an FPGA fabric. These tasks might include data logging, networking, e-mail, transfers via File Transfer Protocol (FTP), and remote Web control.

An example of this approach can be found in an application devised by Active Signal Technologies Inc. and Mink Hollow Systems Inc. Developers there used a CompactRIO with its FPGA capabilities to devise a mechanism that functions in a manner analogous to a camshaft. The virtual camshaft drives a rotary valve in a hydraulic pump.

In this instance, developers use the CompactRIO floatingpoint unit to synthesize a sine function for driving a pump actuator. (The FPGA could potentially have generated the sine function using a lookup table, but this approach would introduce problems affecting phase resolution.) The application uses a motor, which turns a rotary valve in synchronism with the rapid oscillations of an electromagnetic actuator. A 512-step encoder resolves the angular resolution of the rotary valve to 0.7° per encoder step.

The FPGA reads the position of the absolute encoder, which directly corresponds to the location of the rotary valve. It then puts out a corresponding voltage to the pump actuator. This action effectively generates sinusoidal waveforms at 3 kHz and creates a virtual camshaft coupling the rotation of the motor with the excitation of the pump actuator.

The need for the 3-kHz rate made the FPGA the only viable option. The 44-MHz loop rate of the FPGA let developers create an effective resolution beyond that of the raw encoder signal using a technique similar to a sigma-delta A/D converter. Specifically, the system oversamples the encoder and timing bit transitions to boost feedback resolution from 4.2 to 1.05°. At the top motor speed of 30,000 rpm, the 9-bit encoder changes from one step to the next every 3.9 µsec. A single-cycle loop running at 44 MHz on the FPGA iterates 171 times in 3.9 µsec. By counting the cycles between encoder steps, the software interpolates the angular position of the motor during the next step of the encoder.

All in all, embedded technologies such as FPGAs can complement the sequential processing offered by PCs and PLCs.

MAKE CONTACT
National Instruments Inc.,
NI.com

Rate / Comment on this Article

Post a comment

Be the first to comment on this article

Login to post a comment
Inkjet Material Deposition System
The MDS 300 is an ultra high precision Materials Deposition System. It enables digital deposition of a wide range of fluids utilizing inkjet printhead technology. The MDS 300 allows the ultimate flexibility in printing capabilities. Users can input print resolution, print speed, printhead separation and curing processes. It can be utilized in both R&D and pilot line production applications....
Printed Solar Power
Plextronics, Inc. is an international technology company that specializes in printed solar, lighting and other electronics. Headquartered in Pittsburgh, PA, the company's focus is on organic solar cell and OLED (Organic Light Emitting Diode) lighting, specifically the conductive inks and process technologies that enable those and other similar applications. In printed solar cells, sunlight is...
Genesys Programmable Power Supply
Lambda's Genesys family of programmable power supplies sets a new standard for flexible, reliable, AC/DC power systems in OEM, Industrial and Laboratory applications. Now available in more power levels (750W, 1.5kW, 3.3kW, 5kW, 10kW and 15kW) and with available output voltages from 7.5 to 600V and current up to 1,000A. This member of the Lambda Genesys product family of programmable switching...
TerraMax Autonomous Cargo Truck
The TerraMax autonomous truck is based on Oshkosh’s Medium Tactical Vehicle Replacement (MTVR) defense truck platform. Most recently, TerraMax competed in the 2007 Darpa Urban Challenge. The MTVR was designed for the US Marine Corps with a 70% off-road mission profile. TerraMax's unmanned ground vehicle kit does not interfere with the conventional operation of the vehicle. A robust sensor suite...
V-Bat VTOL UAV
MLB Company's next generation UAV is the V-Bat, a tail-sitter VTOL craft that can take off and land vertically, eliminating the need for a runway or catapult, as well as hover autonomously. For autonomous waypoint navigation, it can transition smoothly to the horizontal for speeds up to 100 mph. MLB Company has been involved in a wide variety of projects, ranging from the 15’ wingspan Volcano...
The blame game
I feel there was a glaring omission in Mr. Berke's May 25, 2006 column titled "For lack of a guard, a severed hand" — personal responsibility.
Shake, rattle, and modal analysis
FEA can be a useful tool for sizing up resonance problems.
Biomimetics could hold a key to next-generation body armor
Who would have thought that your wife's jewelry holds the secret to better body armor?
What's a mechatronics technician?
When Keith Campbell muses about industrial education, his thoughts go back to his uncle Ralph.
The meaning of bearing life
How long will a bearing last? Standardized life equations help to answer.
Engineering an ad
How do you convince a doubting public your truck is tough? You show them.
Tricked-Out Trucks
Stylists and engineers are exploring new ways to personalize pickup trucks, the best-selling type of vehicle in the U.S.
Tom-Thumb turbines power radio-controlled jets
Engineers have managed to shrink the modern jet engine until it is small enough to fit in model planes.
Engineering in India
Here’s a snapshot of the Indian engineers who increasingly compete for global manufacturing work.
Gulliver's Engines
Shrinking full-scale engines to pocket size is no small feat.
PRODUCT SEARCH
Powered by
SEARCH THE PLASTICS WEB™
Powered by
FORUMS
Mass-Transit Myths
It should be noted, Hong Kong = very high population density, very high job density. So not a surprise that mass transit is very convenient there.

What’s Tough About Training
This issue’s emphasis on motion control prompts some reflection on how people learn about motion technology. Often theoretical training isn’t...

What’s hot? Not ethanol
This special issue looks at some of the technologies and industrial themes that are eliciting a lot of interest in the technical community. But...

We Don’t Know How to Recreate Silicon Valley
Preseason football is on TV, the kids are getting ready for the school year, and theme parks are anticipating their final Labor Day crowds. It...

Hydraulic Pump design
Where can i find a person that can design hydraulic pumps? immediatly Terra 503-612-2040