What are the critical factors when choosing a motion programming language?

Shah • Galil: Many programmers struggle with this question. From the 1950s through 1980s, Fortran was considered the language for engineers and scientists. Now C/C++ is used much more widely. Engineers are switching to languages that make programming tasks easier, faster, more portable, and easier to maintain. Points to consider are ease of learning the programming environment, language features, multitasking/multi-threading, modes of motion, automated service routines, debugging and support tools, and cross-platform support.

Fritz • NI: One of the top challenges for motion control engineers is motion integration. Some motion control companies try to relieve these issues (and harmonize control functionality across platforms) by complying with international standards. For example, PLCopen Motion Control Library defines reusable components that reduce the hardware dependency of motion applications, increase reusability of software components, and allow engineers to adapt their knowledge when switching between tools of different vendors.

Massoud • Omron: The programming language must be real-time to ensure execution of different motion tasks. Further, in almost all applications with motion of different types involving different axes simultaneously, multitasking allows complete control of parallel tasks to execute safe and desirable motions. The programming language should have a set of well-developed APIs (application program interfaces) or a library of function calls. Engineers can use these to design and implement the application. These should include common functions, such as gearing, camming, homing, registration, absolute and incremental moves, and velocity moves. Programming tools should also facilitate development, debugging, and testing of the code, programs, and motion dynamics.

How does motion programming differ from other programming tasks?

Fritz • NI: Motion control programming requires tools that provide the right level of abstraction. Engineers typically don't want to deal with low-level signaling for motors, and don't want to create algorithms that control the flow of energy within motor coils. Instead, they want to design their system based on functions that perform different move types (like straight line, arc, or contours) and use advanced features to synchronize multiple motors through gearing and camming functions. By combining different functions and defining their sequence, engineers create the motion profile, based on which the system generates the trajectory and performs the exact movement and positioning of coordinated motion axes.

Tasks like supervisory control or spline interpolation for smooth motion must be provided through a higher-level motion engine. While this level of abstraction simplifies the design of standard motion control applications, there are still many applications that require lower-level access to control algorithms or the I/O channels. For applications that require specialty I/O or advanced algorithms like field-oriented control or kinematics, some motion control software provides an interface that allows engineers to customize individual components and solve non-standard cases.

Massoud • Omron: Motion programming is unique and different from safety, PLC, and HMI in many respects. First, motion deals mainly with a dynamic system, which has its own characteristics. It's not like safety or HMI code, in which programming is more about on/off status or data exchange. Motion control, in addition to the I/O and data exchange in real-time, must execute trajectories, paths, control law, and feedback measurement dynamically and during every sample of the servo loop. It is not just commanding a move; it requires coordination, synchronization, and monitoring. Engineers should be knowledgeable about many different areas, including mechanical, control, electrical, and electronics, as motion control is a complex mechatronic system.

Wolfgram • B&R: A programmer needs to be aware of all aspects of a system when programming motion profiles. On a macro level, the mechanics of a system need to be considered. What are the limits of the system? How will system behavior change as components begin to wear? What possibilities and limitations do certain actuator types bring? On a programming level, the engineer needs to be aware of communication latencies, electrical gearing and camming requirements, and code cycle times.

We hear a lot about compatibility with IEC 61131-3. How do these languages impact motion programming?

Shah • Galil: Motion programming is very different from I/O programming. The standards created under IEC 61131-3 allow basic motion blocks to be integrated under a PLC-based system. This enables the programmer to include generic motion profiles to take place. The environment also assumes that the programmer is familiar with one of the five most common programming formats. When the standards were first created in 1993 and later updated, it was assumed that there would be a dedicated programmer with expertise in one of these five methods. Now, software engineers are trained in many advanced programming languages, and their preference is to use a programming language that provides power and flexibility, rather than the IEC 61131-3 format.

Applications have become more complex and in many cases, the standard IEC-61131-3 motion blocks don't cover the functions required; a programmer must then create special command blocks to achieve these functions. When using the native programming language on the motion controller, the need to create these blocks is eliminated. However, the IEC-61131-3 standard has benefits when programming is primarily focused around I/O-integrated, basic motion blocks.

Wolfgram • B&R: These languages allow engineers to adjust more easily to different code development environments. With IEC 61131-3, a common element exists for the motion programming between different automation programming packages. When PLCopen is used, the common element is further increased, allowing the programming to focus on the system being designed, and not the tool used to design it. A well-defined, modular code set can be developed by the programmer and used across multiple programming platforms.

Make contact

Kaushal Shah
Galil Motion Control
(800) 377-6329
www.galilmc.com

Christian Fritz
National Instruments Corp.
(888) 280-7645
www.ni.com

Atef Massoud
Omron Electronics LLC
(800) 556-6766
www.omron247.com

Ben Wolfgram
B&R Industrial Automation Corp.
(770) 772-0400
www.br-automation.com