Share this

How to create a complex multi-axis motion control system using LabVIEW? A step-by-step guide to design and implementation.

2026-04-06 03:49:03 · · #1

Motion control technology plays an increasingly important role in national economic and defense construction, and its applications are becoming more and more widespread. In industrial production, motion control systems are used to improve both product quality and output. Motion control technology is continuously penetrating various fields and advancing rapidly, its application scope now covering almost all industrial sectors. With the development of industry in recent years and the gradual increase in requirements for various mechanical performances and product quality, the control of a single motor is no longer sufficient to generate some complex trajectories. This necessitates the coordinated control of multiple motors, thus giving rise to multi-axis motion control systems.

LabVIEW, developed by National Instruments (NI), is a powerful graphical programming language known for its intuitive, simple, and fast programming capabilities. It is gaining popularity among programmers, especially those outside of software engineering. This paper presents a LabVIEW-based multi-axis motion control system using a PC + motion control card design. It also proposes ActiveX technology to connect LabVIEW with external code, enabling the use of functions provided by the motion control card to develop real-time multi-axis motion control system software that meets practical application requirements.

01

System hardware design

This paper adopts a "PC + motion control card" model to design a multi-axis motion control system. This type of multi-axis motion control system only requires designing a user-friendly human-machine interface and functional programs in a Windows environment based on the control requirements of the controlled object to achieve the purpose of multi-axis motion control. The hardware of the entire multi-axis motion control system consists of a PC, motion control card, motor, driver, and actuator. The PC and motion control card communicate via the PCI bus, and the upper-level control software is designed and developed on the PC using the LabVIEW software development platform. The system structure and principle are illustrated in Figure 1.

This multi-axis motion control system features a typical upper-lower-level computer structure, facilitating coordination and management of multi-axis motion control and improving real-time performance. The PC acts as the upper-level computer, setting parameters such as position, acceleration, and speed for multi-axis motion, and handling non-real-time tasks such as human-machine interface management, information display, and preprocessing. The motion control card acts as the lower-level computer, receiving control signals from the PC and processing them in real-time. It implements motion control algorithms and performs necessary logical and mathematical calculations based on job requirements and sensor signals to provide correct control signals to each motor to complete the required multi-axis motion. Furthermore, it can return the current position, speed, and other parameters to the PC in real-time, allowing for software programming on the PC to display the motion trajectory image.

Image 1

This multi-axis motion control system uses a dedicated motion control card as an independent standard component. The motion control card is the latest ACR1505 series from Parkerhansine Technology, Inc., which boasts higher performance compared to similar products, particularly excelling in control precision, speed, and ease of operation. It is widely used for high-performance motion control. It employs a 32-byte floating-point DSP with 120 MFOS processing power, four 30MHz encoder inputs, and communicates with the host computer via a PCI bus to control four-axis servo or stepper motors. Both the motors and drivers are high-performance products manufactured by Shanghai Mingzhi Technology Co., Ltd. Incremental pulse encoders are used for position detection in the closed-loop servo system, significantly shortening the design and development cycle and improving system performance.

By embedding the motion control card into a PC as a plug-in, a multi-axis motion control system in the "PC + motion control card" mode is formed. This organically combines the information processing capabilities and open nature of the PC with the motion trajectory control capabilities of the motion control card, giving the multi-axis motion control system the characteristics of strong information processing capabilities, high degree of openness, accurate motion trajectory control, and good versatility.

02

System software development

Regarding the system's control software, the control interface and control program for the multi-axis motion control system were designed and developed using LabVIEW software on a PC. By inputting motion control parameters such as the target position, acceleration, and velocity of the multi-axis motion into the system control interface, the ACR1505 motion control card will control the motor's movement based on this information, completing the planning of the motion trajectory and reading the real-time motion position coordinates.

This paper uses LabVIEW as the development platform for the host PC software system. It offers convenient programming, an intuitive and user-friendly interface, and eliminates the complexity of traditional development tools, providing powerful functionality while ensuring system flexibility. LabVIEW provides ActiveX external program interface capabilities, allowing easy access to programs and controls in the motion control card. Through ActiveX automation, LabVIEW can act as both a client and a server. As a client, LabVIEW can call ActiveX objects in the ActiveX automation server to obtain their properties and methods, which users can then use for programming. This paper describes how, on the LabVIEW platform, ActiveX technology is used to call ActiveX objects in the ActiveX automation server program provided by the motion control card for further programming processing. This enables the control of position, velocity, acceleration, etc., of multi-axis motion, as well as the implementation of motion control algorithms such as interpolation. This allows for the rapid development of control functions for a multi-axis motion control system, significantly shortening the development cycle.

The ACR1505 motion control card provides an ActiveX automation server named "Co-mACRsrvr". This ActiveX automation server contains four callable ActiveX objects: status, control, terminal, and utility. These ActiveX objects provide various properties and methods for operating the motion control card. For example, status provides properties and methods for obtaining motion control status information and related data; control provides properties and methods for setting motion control parameters such as speed and position, etc., for implementing control functions. LabVIEW can call these ActiveX objects and access their properties and methods to implement various control and operation functions of the motion control card. The main implementation process is shown in Figure 2.

Image 2

03

Implementation of control program

To implement multi-axis motion control programs, ActiveX automation is required. LabVIEW acts as the automation client, and the functions provided by the motion control card act as the automation server. This allows LabVIEW to call the ActiveX objects provided by the motion control card and access their properties and methods. LabVIEW provides a rich set of functions for ActiveX operations, located in the Connections-ActiveX panel of its block diagram's function template. Key functions include: AutomationOpen, used to open an ActiveX object and obtain its reference; PropertyNode, used to read or set the properties of an ActiveX object; and InvokeNode, used to call methods provided by the ActiveX object.

To use LabVIEW as an automation client to manipulate ActiveX objects, first copy the file named ComACRSrvt.tlb from the software package provided by the motion control card to the LabVIEW software's directory. Then, place the AutomationOpen function in the LabVIEW block diagram to open a reference to the ActiveX automation function. Create an AutomationRefnum control connected to the top-left terminal of this function, allowing you to select and invoke ActiveX objects through this control. To access the methods (or properties) of an ActiveX object, place one or more method (or property) node functions InvokeNode (or PropertyNodes) in the block diagram and connect the AutomationRefnum output on the right side of the AutomationOpen function to the Referenceinput terminal of the method (or property) node. To access multiple properties and methods of an ActiveX object, connect the nodes sequentially end-to-end.

This paper presents a program capable of performing multi-axis motion. The program consists of two parts: a motion control section and a motion display section. The front panel of the program that performs two-axis motion control is shown in Figure 3.

Image 3

The motion control program programs access and programs the properties and methods of the control object, and sets the speed, acceleration, target position, and motion mode of the multi-axis motion through the front panel to control the multi-axis motion. The motion mode selection button allows selection of the motion mode of the multi-axis motion control system, enabling both absolute and relative motion modes. Absolute motion uses the input target position parameter as the absolute distance of the new motion; relative motion uses this parameter value as the distance of the new motion relative to the current position. The motion display section programs the real-time position coordinate reading and motion trajectory display functions of the multi-axis motion by calling the properties and methods of the status object. In addition, this program adds communication connection testing and error report display functions. The on/off status of the connection test indicator light shows whether the corresponding ActiveX object is correctly called by the LabVIEW program. If an error occurs during control, the error report can be viewed in the error report bar for appropriate handling. The following will further explain these two parts of the program:

Image 4

The flowchart of the motion control section is shown in Figure 4. The fMoveACC, fMoveVE, and bMoveAbsolute properties are used to set the acceleration, speed, and mode of the motion, respectively. The connect method is used to set the communication mode between the control card and the PC, specifying it as PCI bus mode. The Move method is used to set the motion position and the number of axes participating in the motion.

Image 5

The flowchart of the motion display section is shown in Figure 5. It mainly uses the GetACRCustom method of the status object to read parameters such as motion position coordinates returned by the control card. It is set to record the current motion position coordinates of this multi-axis motion control system every 10ms and generate a motion trajectory diagram.

This paper designs a multi-axis motion control system based on LabVIEW using a "PC + motion control card" scheme, and develops the control program for the multi-axis motion control system on the LabVIEW software platform. Currently, many motion control programs are developed using software such as VB and VC++, where interface development often constitutes a large portion of the programming work, hindering efficiency. This paper leverages the ease of use of the LabVIEW interface and its ability to call ActiveX functions to achieve rapid development of the system's motion control program on the LabVIEW software platform. This method avoids tedious interface programming, shortens the development cycle, and improves efficiency. This system has been applied in a water immersion C-scan imaging ultrasonic non-destructive testing motion system. Experimental results show that the system's positioning accuracy is ±0.065mm/300mm, repeatability is ±0.05mm, and resolution is 0.01mm, demonstrating high control accuracy and performance.

With the rapid development of automation technology, machine vision inspection and control systems have been widely used in fields such as work condition monitoring, product inspection, and automatic control to improve production efficiency and automation levels. One of the most important applications is multi-axis control in industrial automated production lines. How to achieve monitoring and automatic control of the entire production line, what are the specific cyclic design approaches, and how to effectively implement LabVIEW-based联动 control and unified system software management, especially when dealing with 20, 50, or even more axes?

Disclaimer: This article is a reprint. If it involves copyright issues, please contact us promptly for deletion (QQ: 2737591964). We apologize for any inconvenience.

Read next

CATDOLL 135CM Laura (Customer Photos)

Crafted with attention to detail, this 135cm doll offers a well-balanced and realistic body shape that feels natural in...

Articles 2026-02-22
CATDOLL 148CM Qing Silicone Doll

CATDOLL 148CM Qing Silicone Doll

Articles
2026-02-22
CATDOLL 126CM Sasha

CATDOLL 126CM Sasha

Articles
2026-02-22