Tips on interfacing PC-based control into motion systems

July 1, 2000
Engineers in machine control applications face many choices in the control of motion. PC-based control, in particular, offers a range of options including software-based machine logic (soft-logic). This article will help you sort through the maze

Several trends affect an engineer’s choice of controller for machinecontrol and motion-control systems.
• The personal computer is becomming the common control device in manufacturing processes, replacing the PLC and even the CNC in many applications.
• The PC is unbundling from a package that contains hardware and software into a package that is primarily software.

These packages often are known as softlogic PLCs or softPLCs. About a dozen manufacturers offer such a product. Therefore, from traditional motion controllers to PC-based controls to softlogic products, engineers have many choices when designing a motion system. A PC-based motion system may look like Figure 1, with several software or hardware- based controllers interfacing with a central PC that can be software or a hardware- software package.

Choosing a controller for applications that require only motion control (pure motion) or complex motion control involving interaction with discrete functions is fairly straightforward. Here, pure motion is defined as simple X or Y motion or X and Y, such as pick and place applications. Complex motion usually involves synchronization, interpolation, and coordinated motion of several axes and often requires a CNC controller.

The difficulty rises when trying to choose a PC-based controller for applications that involve both motion, discrete control, and human machine interface. In addition to finding a PC-based solution that meets the functional requirements of the application, engineers must also balance the requirements of:

• Openness.
• Economics.
• Ease of use.
• Technology applicability.

Openness

Many vendors claim that their systems are open. Because there is no generally accepted definition for such a feature, engineers must determine the level of openness they really need in their application. A truly open control system should enable engineers to choose the best PC hardware, machine control programming language, human machine interface device (HMI), input and output modules, and motion control devices regardless of who makes them. These devices should operate together almost seamlessly.

There are several manufacturers that produce I/O device-level networks that are compatible with almost any system. And Windows software from Microsoft has become a defacto standard for human machine interfaces. But machinecontrol programming languages and motion control devices still have a way to go before they are truly open.

Ecomomics

PC hardware is becomming more open. There are choices an engineer can make to enhance the openness of PC hardware, but then economics comes into the decision. In a PC-based motion control solution, PC hardware should be selected based on microprocessor power, cost, packaging, and flexibility. Current microprocessor choices range from the 200 MHz Pentium to a 386 microprocessor. The selection depends on the requirements of the operating system (such as Windows NT or another system), HMI requirements, and whether the PC will be used for other tasks, such as controlling the motion through software or networking to a Dynamic Data Exchange (DDE) client.

PC hardware is available in ruggedized industrial versions or commercial desktop versions. An industrial PC will cost more that a desktop model because its packaging can withstand shock, vibration, and the temperature extremes often found in manufacturing plants. Commercial versions, though, can run more software and hardware peripheral packages from different vendors.

For as little as $300 or as much as $1,500, a small PC or embeddable PC may be a control solution for a machine and motion-control system. Small PCs with a solid state hard drive can be used in applications where there is no ventilation or cooling of the control cabinet. These PCs save the cost of special enclosures and cooling additions.

Embeddable PCs also save space in a control design. The PC-104, for example, is a 4 x 5-in. card that is functionally a repackaging of the ISA-AT bus. A more recent embeddable card, the PCI, is a replacement for the ISA-AT bus. These PCs are often best in applications that require remote operation.

Ease of use

A PC-based control should be flexible enough to allow the concurrent use of vendor supplied configuration-setup software and run-time control-system debug tools. Such a system would run, for example, a hardware-based motion controller on the PC backplane while simultaneously running a software-based machine control program.

Because Windows NT is quickly becoming the de facto standard operating system (OS) for manufacturing applications, the software mentioned above would run on Windows NT. As of this writing, Windows NT is incapable of the microsecond response motion applications often require. However, several companies are working to develop software, known as real-time kernels, that when added to Windows NT will provide the ability to respond to a motion condition in less than 100 msec — real-time control. These kernels should be available during the third quarter of 1997. A caution, though, some of these real-time kernels are proprietary. Engineers still must carefully choose tuning software and control program software for compatibility.

Windows CE, a compact form of Windows NT, enhances scalability, making it possible to create a smaller sized system. CE requires less RAM memory than NT, enabling the operating system software to run on embeddable PCs.

Technological applicability

Traditionally, a CNC controller used Gcode programming for motion commands while general machine control used the PLC ladder language. These are effectively two different tasks in a multitasking environment.

The motion program and PLC program communicate to each other through M variables. It has always been up to the programmer to keep track of these variables while establishing the handshaking code between them. In addition, engineers usually must buy other software to obtain diagnostics for these separate functions.

Another method involves using a stand-alone motion controller separate from the PLC or machine controller PC, along with separate software programs for configuration and for each control.

It’s an inconvenience to exit the PC control software to tune an axis. Recent software introductions combine control software with diagnostic, setup, and even other types of control functions, thereby reducing the number of needed programs.

These integrated motion control programs issue motion commands, such as Move axis X to absolute position NNN.N, from the same program that issues discrete control commands, such as Is auto cycle active, Figure 2. All functions for manual and automatic operation can be done in this one program, as well as axis functions like:

• Start axis home and reference.
• Enable, disable axis.
• Feedrate override.
• Jog axis continuous, ±.
• Jog axis incremental ±, with various settings for the increment.

Engineers can also obtain status information (fault, axis on positive or negative limit, move done, watchdog tripped) and configure the motion controller.

Figure 2 illustrates how such a program might look on a development tool, (programming device or human interface operator station). Flow chart programming, where engineers used decision diamonds and squares, is replacing ladder logic and Englishbased code.

The control logic is not activated unless Incremental jog mode is active. The first control block enables axis X, then the flow passes into a decision block where the Jog plus incremental PB is checked. If the pushbutton input is on then the program goes into a loop where it checks axis X to see if it’s at the step, Approach position 1. If not, then the Axis control block commands an Incremental jog value of +0.001. The program will re-issue incremental jog commands until axis X reaches the target. When the axis reaches Approach position 1, then the program issues a stop motion command to stop the axis immediately, and it checks for the jog PB input.

Such a flowchart-type program would run in a multi-tasking environment with additional flowcharts that control other aspects of the motion system, general machine control functions, and the operator interface. Status information from each flowchart can be retrieved simultaneously. This type of flowchart can also contain a subroutine of RS274D M and G codes for directly manipulating the motion controller.

Safety considerations

Most suppliers of PC-based solutions provide a watchdog hardware output contact for use in a hardwired Estop logic chain, in case the processor unexpectedly shuts down. Engineers might also consider a software watchdog between the PC control software and the motion controller. This would let the motion controller perform a graceful shutdown if the PC CPU develops a fault. Engineers can program the watchdog function at the application level if the motion controller supports a secondary task (usually called a PLC task by most motion controller companies) and the communication between the PC and motion controller is fast enough.

Brent Bartson is senior applications engineer of Think & Do Software, Ann Arbor, Mich.

Sponsored Recommendations

NEW Low Profile, Ultra Compact Power Supplies

March 13, 2024
Learn more HERE about Altech's Power supplies!

Altech's Liquid Tight Strain Relifs Catalog

March 13, 2024
With experienced Product Engineers and Customer Service personnel, Altech provides solutions to your most pressing application challenges. All with one thought in mind - to ensure...

Industrial Straight-Through Cable Gland

March 13, 2024
Learn more about Altech's cable glands and all they have to offer for your needs!

All-In-One DC-UPS Power Solutions

March 13, 2024
Introducing the All-In-One DC-UPS, a versatile solution combining multiple functionalities in a single device. Serving as a power supply, battery charger, battery care module,...

Voice your opinion!

To join the conversation, and become an exclusive member of Machine Design, create an account today!