PCs are the great mimic of the industrial world, capable of duplicating the features and actions of just about any control. As long as a software engineer can define another controller's functions in program code, the software can be installed on a PC and you have your replica controller.

Tailor-made

PC-based controls are inherently flexible devices, made even more so through the electronics industry's range of plug-in cards and application software. With the right software development programs, or tools, you can create custom code that extends control capabilities to meet specific application needs. But don't let the word "custom" fool you. Even though the code is specific to your machine and needs, it won't necessarily make your PC incompatible with other software and peripherals. This is largely due to the development tools' adherence to standards and their ability to handle the interfacing for you.

Software tools that make tailoring simpler, faster, and more efficient include ActiveX Container, VBA Scripting, Visual C++ Object creation, OPC Server, and OPC Client.

ActiveX, from Microsoft, is one of the most used customization tools. A programming model, it simplifies writing code in Microsoft's Visual Basic or Visual C/C++ programs, making it easier to integrate and reuse software components. Engineers write code once using its features, and then they can slip that code into other programs as often as needed. You don't need to know the internal workings of other programs because ActiveX smoothes the interfacing.

ActiveX is unique in that it allows data to be transmitted among applications bi-directionally at high speeds. For example, a PC-based control operating on WindowsNT can use ActiveX to share and display information among I/O, data tables, or control programs.

Here's an example of what a company can do with this capability. A major manufacturer of residential locksets recently installed an NTbased data acquisition program with a soft control. The goal was to seamlessly integrate control and information systems throughout the company network. The manufacturer now collects uptime, downtime, and parts in-and-out data from supervisory control systems that make the "information level" in a manufacturing hierarchy. Managers needn't go through the system gateway to the programmable controllers to retrieve these data, as they used to do, so they don't bog down the network.

Other tools often used to add to or modify a PC control system are the programming languages C or C++. If you have math intensive algorithms, you can code them once and then are able to copy the program routine into other application programs.

Some of these C/C++ commands also let you specify the execution algorithm and add new instructions to the controller's preprogrammed set without informing or involving the original control manufacturer. To any user of the PC control, the new instructions look no different than the ones installed by the manufacturer. This seamless look and feel reduces confusion and possible error in the field. Instructions can be designed to execute sequentially within existing programming or within an external process.

For example, a large film manufacturer uses these tools to encapsulate several complicated process-control functions. This lets shop floor personnel deal with the information as instructions rather than as unprocessed bits of data.

Such tools let engineers incorporate a complex algorithm into the core of the programming software, yet retain the simplicity of use presented by a ladder instruction.

Double-time

In addition to software, a few hardware "tools" can help you do more latest are floating-point accelerators – chips consisting of logic gates and latches that execute complex math in a fraction of the time taken by software algorithms.

Another hardware improvement is larger memory cache on the motherboard and in a CPU. Temporarily storing data here speeds instruction execution. Instructions are executed at the clock speed of the processor rather than at the speed of the slower main memory bus. And these clock speeds continue to advance the pace. CPU development is still holding to Moore's Law, with performance doubling every 18 months. The latest chips run at clock speeds of 500 MHz. They are so fast that the main roadblocks holding back system performance are physical laws - mechanical devices are unable to react fast enough to the electrically calculated commands.

But speed is crucial to process all the data that are gathered from drives, sensors, and machines. Even 500 MHz is not fast enough for some applications. Thus, more PCs are using multiple CPUs to speed up program execution. Such parallelism was a feature once found only in large and mainframe computers.

Continue on page 2

The most common implementation of parallelism is through Symmetric Multi Processing (SMP), an approach used by Intel to add more than one CPU onto a motherboard. An operating program like WindowsNT would segment an application program, putting one part on one CPU and the rest on another to execute tasks in parallel.

Adding in, taking out

Applications usually grow after the initial launch, requiring the addition of I/O cards and network links. PCs are "network agile," meaning they are compatible with various I/O cards and network adapters from almost any vendor.

Increasingly, such agility is also being offered in several other ways. The PC may have all the additional flexibility resident on the system. You pay for all of this capability whether you use it or not. The second method is to select hardware and software scaled for specific needs. Communication options are among the first features to undergo this progression, but by no means the last. The scaled systems let you choose only the number of communication channels you'll need to run an application – one or two, or you can choose unlimited channels to handle current and future requirements.

Defining software

PC software continually evolves. Usually with each change, a new acronym or word enters the lingo. Here's a partial list of the latest terms you're likely to encounter.

ActiveX - Object-technology based software that helps programmers create, integrate, and reuse software routines.

AdvanceDDE - A form of Dynamic Data Exchange developed by Rockwell Software. DDE facilitates the movement of data from source to destination. AdvanceDDE puts multiple DDE operations into packets, which are then sent in one transaction. It also brings consistency to error reporting.

COM - Component Object Model is an object-oriented programming method that defines how objects interact in an application or between applications. (Object-oriented programming is a modular approach to software coding that combines instructions with data.) An application may use features of any other application object or operating system without affecting the operation of that application. COM is the core of DCOM, ActiveX, Visual Basic, and object linking and embedding technology.

DCOM - Distributed Component Object Model lets COM distribute objects over networks, including the Internet, transparently. It makes remote components appear local.

DLL - Dynamic Link Library is a file with one or more functions that are compiled, linked, and stored separately from the processes that use them.

ODBC - Open Database Connectivity is a tool developed by Microsoft that allows third party tools to access different database formats.

OLE - Object Linking and Embedding defines a set of standard interfaces that enable one application to access the services of another.

RAD - Rapid Application Development is a name given to two or more Windows programming tools. These tools include Visual Basic, Oracle PowerObjects, Borland Delphi, and Sybase's Powerbuilder.

VBA - Visual Basic for Applications is part of Microsoft's Visual Basic family. It's a software tool for developing applications from scratch but is used more to customize and extend existing off-the-shelf applications, such as RSView32.

VBX - Visual Basic Control is snap-in executable code that conforms to Visual Basic and brings in additional capability to an application. OCXs, or OLE Custom Controls, should replace VBXs soon.

Dave Rohn is development manager, SoftLogix Business, Rockwell Automation, Mayfield Heights, Ohio.

Related Article

Time saving technology: Programming software