Motion Control Software / Tools

PI provides high-level, robust, easy-to-use motion control software tools for fast, seamless integration of motion systems into application control software. Supported programming languages and applications include LabView, C++, VB, Matlab, Image Acquisitioning Packages, NI DAC Cards, ...

Choose from a Topic Group below

Platform-Independent Software Concepts

 PI pursues a platform-independent and hardware-independent concept in the design of the motion control software. This approach has proven its worth and is even flexible for future enhancements. The following points distinguish this concept:

 

  • Simple installation of the software
  • A uniform, graphical interface for all connected controllers and axes
  • Simple handling of parameters for all stages
  • Standardized command language, General Command Set (GCS), for all controllers
  • Standardized programming interfaces (API) for all common programming languages
  • Simple implementation of customer-specific requirements

General Command Set (GCS)

The General Command Set (GCS) ensures a maximum compatibility between all PI positioning systems as well as smooth (trouble-free) updates and upgrades. GCS offers a standardized set of commands which is independent of the connected controller or the drive principle used.

Starting up and programming, therefore, becomes much easier: Various positioning systems can be operated at the same time and new systems can be integrated with minimal programming effort. Thanks to GCS, the development of customer-specific applications is also simplified while being less prone to errors since the commands are identical in syntax and function for all supported devices.

The currently available version of GCS is GCS2.

The GCS concept comprises the following points:

 

  • Standardized, human-readable command syntax
  • Standardized error codes
  • Standardized parameter names
  • A single NI LabVIEW driver set for all systems
  • A single programming library for all text-based languages
  • Standardized user programs
  • One parameter database for all supported axes

Preset Parameters for Startup

All necessary parameters to operate a system made of a stage and a controller are determined at the factory.

 

  • With all controllers for motor drives, the mechanical and servo-control parameters are stored in a parameter database. For operation, the mechanics for the appropriate controller just has to be selected from a list.
  • With piezo systems, the controller and the mechanics are only delivered in pairs, or the properties are stored in an ID chip. The controller recognizes the mechanics and automatically uses the settings stored in the database for it.

Automation of Procedures Using Macros

Many applications require automated motion sequence. The user can specify the appropriate sequence of motion commands using macros.

  • Commands, included in the General Command Set (GCS), are used for commanding the motions.
  • A series of GCS commands can be stored as a macro on the PC as well as on most controllers.
  • The processing or the stopping of a macro can be subject to conditions. In addition, loops can be realized for example.
  • Macros can call up themselves or other macros at several nesting levels.
  • Variables can be used in macros and input signals can be evaluated for conditions and variables.
  • For the standalone operation any macro can be defined as the autostart macro. This macro will automatically start with every switch-on or reboot of the controller.

The following example, where Axis X is initialized after the controller is switched on and two positions are approached, shows how simple this is. The "STRATUP" macro is automatically initialized when starting the controller.

Examples for using GCS macros

 

 

"STARTUP" MacroInitialize the Axis
SVO X 1Switch on the servo mode for axis X
FRF XStart a reference move for axis X
WAC ONT? X = 1Wait, until the reference move of the X axis has been completed
VAR LEFT 5
VAR RIGHT 15
Use variables to define the left and right target position
MAC START MOVLRStart "MOVLR" macro
"MOVLR" MacroMoving the axis to the left or right target position
MAC START MOVWAI $ {LEFT}Start "MOVWAI" macro with the value for the "LEFT" variable
MAC START MOVWAI ${RIGHT}Start "MOVWAI" macro with the value for the "RIGHT" variable
"MOVWAI" Macro Moving the X Axis to the Target Position
MOV X $1Moving the X axis to the position which was given as an argument when calling up the macro
WAC ONT? X = 1Wait, until the X axis has reached the target position

For more complex tasks which the controller has to carry out independently, the user can use scripts based on Python. These unite the power of the Python programming language with the flexibility of PI's GCS commands.

PI Software and Interfaces

The diagram shows how PI software and interfaces support the customers’ tasks in the best way.

User Programs and Their Functions

Every PI controller is delivered with an extensive software package. The delivered user programs support the user in setting up and parametrizing the overall system. For the execution of motion commands and additional optimizations, no additional programming effort is necessary. Intuitively operable user interfaces, comprehensive online help pages, graphic visualizations, and simple automation possibilities support a quick introduction and trouble-free usage.

PIMikroMove

All positioning systems from PI can be controlled clearly and comfortably with PIMikroMove, independently of the drive principle, and the number and configuration of the axes. All connected controllers and axes are displayed in the same consistent graphical interface. Several axes can be controlled by different controllers and commanded with PIMikroMove in the same window. Using the Position Pad, the motion of two or more independent axes can be controlled using the mouse or joystick, even in vector moves.

Additional, useful functions are available using comfortable operating elements:

 

  • Data recorder for analyzing the system
  • >> Function Generator to simply generate user-defined periodic motion profiles
  • Visualizing the position of parallel kinematics
  • GCS-based host macros as addition to the macro functionality of the controllers with identical syntax and additional control commands. Any number of controllers can be addressed by one macro
  • >> Tuning Tool for digital piezo controllers
  • Scanning window, that is, depending on the position of one, or more axes, values can be determined and represented, e.g., analog or digital input, or position of another axis
  • Support of Fast Alignment tasks with representation of the determined data

PITerminal

PITerminal is a terminal program with which GCS commands can be directly sent to the controller. It can be used to interactively work with commands in customer programmed applications.

Data Recorder

Thanks to the integration into PIMikroMove, the data recorder is an easy to operate tool for the analysis of data and measured values. It stores data from various data sources while displaying them as a function of time, and offers a fast visualization.

All controllers have an internal data storage. This makes a precise storage of even very fast operations possible. The configuration and selection of the data sources and the type of triggers can comfortably be done using the data recorder window in PIMikroMove.

Typical data sources are:

  • Commanded and current position of the axis
  • Commanded axis velocity and acceleration
  • Motor output voltage per axis
  • Status information
  • Input voltage of the analog inputs
  • System-relevant internal signals

 

Stored, measured values are immediately displayed in the data recorder window in PIMikroMove. Thanks to highly developed functions a precise analysis and evaluation of the data can directly be carried out. In the integrated user dialog, an impulse can directly be commanded. The step response is recorded and represented graphically, therefore allowing for a fast analysis of the system behavior and for the tuning of the positioning behavior.

Examples of integrated functions:

  • Cursor and measurement functions
  • Zoom functions to be able to assess even the smallest signal motions
  • Filter and analysis functions as, e.g., FFT, algebra, derivative and statistic
  • Customizable options to represent the data
  • Import and export of recorded data from and into common data formats as, e.g., csv
  • Export to graphics file and standardized printer output

Tuning Tools

PI positioning systems are delivered with preconfigured operating parameters. Ideally, the operating parameters were determined for the application at hand. Depending on the hardware, the parameters are stored on the controller or on the ID chip, or they can be called from a parameter database using PIMikroMove.

Generally, operating parameters which ensure a robust operation are available for every system.

A customer-specific optimization for particular application requirements can be supported by the following tools:

 

Data recorder

The data recorder offers important information on how good the control loop is working. This information is of fundamental importance for an optimal parametrization. The following functions are available for this purpose:

  • Recording of step responses in closed-loop or open-loop operation
  • Simple analysis of the signals (derivative, differences between two signals, calculation of the signal spectrum using FFT)
  • In piezo actuators and piezo systems: Display of the transfer function in the Bode diagram
  • In hexapods: Display of the transfer function of a single strut

 

Piezo Dynamic Tuner

With the Piezo Dynamic Tuner the frequency and the step response of a system can be determined, and the settings for the servo parameters of the controller can be made. The user can set the control parameters and observe the respective system response. The type of system excitation and data recording can be configured to allow for an optimal characterization of the system. The Piezo Dynamic Tuner has various, powerful features for statistical analysis, determining the settling time, and for the import and export of the measured data.

  • Customized solution for piezo stages
  • Direct access to control and filter parameters
  • Support in calculating the servo-control parameters

Function and Frequency Generators

Many controllers, using the function generator, offer the possibility to store positioning values in internal tables, and to run them once or cyclically in real time. With it, predefined forms of motion such as sinus, ramp, or sawtooth but also any user-defined trajectory points can be commanded. The analysis of the dynamic behavior, scans, shaker applications, etc., are examples of applications thereof.

Depending on the prior knowledge of the user, either the function generator or the frequency generator tool are available on the host software side.

ACS Motion Control Software

For automation tasks with industrial standards we recommend the motion controllers of our partner, ACS Motion Control. These high-performance motion controllers include a comprehensive software suite for easy setup, fast application development, and quick diagnostics. Software applications also integrate and manage potential peripherals into machine control e.g. for laser processing applications. Customizable software platforms for high precision machining and processing round up the portfolio. ACS also offers a PC-based control solution where the soft controller acts as powerful motion controller and PLC at the same time.

>> Learn more on ACS Motion Control

Software Tools for Hexapods

PIVeriMove

Restricted space can cause problems for both motion and positioning systems and the setups on the motion platform as well as for the surroundings. Even when great care is taken during the design of an experimental setup or a production unit, it is not always possible to avoid the risk of collision. The PIVeriMove software calculates the permitted travel ranges for hexapods, if there are any obstacles in the motion range: Whether a sample setup, other moving parts or the wall of the vacuum chamber.

The newly created configurations can be stored as the basis for the geometric calculations in the hexapod controller. The safety gap to the objects is checked online for each motion or position command. This results in new limits for the positions that the hexapod is permitted to occupy.

The target positions and all points along the trajectory where a collision could take place, are checked before being executed. If a collision is impending, the motion is not carried out. For extra safety, a minimum gap can be specified, which is added to the distance irrespective of the direction in space.

The pivot point, which is the reference point for rotation of the platform can be changed at any time.

The workspace limits of parallel kinematics vary according to the current position (translational and rotational coordinates), the current coordinates of the pivot point, and the chosen coordinate system.

The limit value for the load of the hexapod varies as well depending on a number of factors:

  • the orientation of the hexapod
  • the load and the position of the center of mass,
  • the position (translational and rotational coordinates) of the motion platform as well as
  • the forces and torques that act on the motion platform of the hexapod.

 

The PI hexapod simulation tool can comfortably simulate and graphically represent all of these influencing factors. It is therefore possible to recognize any mechanical problems before the application is set up.

Software Emulators - the Hexapod System as a Virtual Machine

It is often desirable to implement the customer software early on without the system being available on site. PI supplies a suitable software that can be used to simulate a complete hexapod system (hexapod mechanics and controller) as a virtual machine on the host-PC. This allows the customers to develop, test, and optimize user programs even before the system is delivered.

For more information about this software, please contact your sales or service representative.

Software Files

Hexapod Simulation Tool

Version / Date
2022-01-26
zip - 18 MB

Programming Languages

Support in Programming

Customers can program or adapt their own user programs so that every PI controller can be seamlessly integrated into their application. For this purpose, various libraries and drivers are available which allow access to the controller in form of encapsulated function calls. A connection and communication with the controller can be established with little effort and independently of the communication interface of the controller.

In the comprehensive software package for PI controllers, libraries and drivers for common programming languages are available, e.g.:

  • C, C++, C#
  • Python
  • MATLAB
  • NI LabVIEW

 

For less common programming languages such as VB.NET or Delphi, you can quickly and easily ask PI for custom solutions.

Not every function is available for all controllers. For details, please refer to the corresponding product data sheets.

C, C++, C#

For text-based languages, such as C, C++, and C#, an API is available that allows the control of PI controllers from propriety programs. This API is available as a dynamic library for the following operating systems: Windows, Linux (macOS on demand); with 32/64 bit respectively. It allows for an easy connection to the respective development environment.

Completed examples ("Samples"), with which the customer can immediately put together a functioning application, are included for all supported programming languages. These "Samples" include first steps such as the connection and fundamental communication with the controller as well as more extensive functionalities with different axes. The usage of the function generator and the data recorder are examples thereof. Upon request, "Samples" can be designed for customer-specific problems or for programming languages not supported.

Python

For more complex tasks which the controller has to carry out independently, that is without connection to a PC, the user can use scripts based on Python. For this purpose, PI offers PIPython, a collection of Python modules, with which PI controllers can be directly controlled using Python. The power of this programming language is, therefore, combined with the flexibility of PI's proprietary GCS commands. Furthermore, PIPython offers a variety of useful auxiliary support functions.
 

PIPython Documentation

PIPython GitHub

 

PIPython can be used starting with Python 3.6+ and it works on all platforms which support Python. Some additional functions are only available with standard operating systems such as Windows, Linux, and macOS.

Example of commands in Python
 

from pipython import GCSDevice
pi_device = GCSDevice ()
# Load PI Python Libraries
pi_device.ConnectUSB ('123456789')# Connect to the controller via USB
pi_device.SVO ('A', 1)# Turn on servo control of axis "A"
pi_device.MOV ('A', 3.142)# Command axis "A" to position 3.142
position = pi_device.qPOS ('A')# Query current position of axis "A"

MATLAB

 

PI controllers can be directly controlled in MATLAB by using the PI MATLAB driver. For this purpose, no additional MATLAB tool boxes are necessary. A Windows installer facilitates the access, a Linux installer is available on request. PI is a Connections Partner of The Mathworks and therefore offers MATLAB users a high-quality integration of PI products into the MATLAB environment.

NI LabVIEW

The PI GCS NI LabVIEW driver set offers complete support of NI LabVIEW as a programming language for customer-specific applications. It offers a complete driver package as well as practical examples including a comfortable configuration VI.

Since nearly the entire driver set is based on pure NI LabVIEW code and NI-VISA communication, it is platform-independent and supports all PI controllers independently of the positioning stage connected. Except for the actual configuration, all VI's are open source and include a comprehensive online help. The sustainability of the customer applications is ensured thanks to the extensive downward compatibility of the driver set.

Possibility of Debugging

For debugging macros, scripts, or programs, tools are delivered which support the developer while searching for errors. PIMikroMove, PI's PC software, supports the debugging process of GCS macros. The macro thereby runs on the PC and the included commands are sent to the controller individually. For example, variable names can be read, or the logical flow can be tested, and much more.

Some controllers can be addressed with Python scripts which run on the controller itself. In this case, a cross debugging is possible. That is, the script runs on the controller while the developer works on the PC and operates the debugger from there.

Third-Party Support

MetaMorph

The driver integrated into MetaMorph is maintained by Molecular Devices themselves and is part of the official MetaMorph distribution. The code is superimposed onto the existing PI software. All PI controllers which are supported by the PI GCS2 DLL and can be connected using USB or RS-232 are, therefore, also supported. XY (sample) as well as Z (focus) drives are supported.

micro-manager

PI has developed a device adapter which is part of the official version of micro-manager. The user, therefore, does not need separate modules from the PI product CD but gets it all integrated into micro-manager on delivery.

All PI controllers which can read GCS2 are supported.

The stages can be combined arbitrarily and are supported as "Z stage" (focus) as well as "XY stage" (sample). Any number of stages can be connected; only the active Z drive or XY stage, however, is selected in the user interface.

Further information available here:

PI GCS 2 - Micro-Manager

EPICS

For EPICS, PI offers its own PI GCS2 driver which is continuously developed and is part of the official EPICS distribution. The list of officially supported PI devices is available at:

EPICS Hardware Support: by Manufacturer

If a controller is not in this list, it does not automatically mean that it is not supported. In this case, our PI sales engineers can offer advice and support.

The EPICS "motor" interface is supported; its documentation is available at:

EPICS: Motor Record and Device/Driver support

The communication is implemented with the modules available in EPICS.

ScanImage

ScanImage supports some PI controllers; they are listed at:

ScanImage Supported Microscope Hardware

(optional)

PI has not developed or tested this implementation.

TANGO

PI does not offer its own driver for Tango, but for many PI controllers Tango supports already exist. Where this is not the case, PI gladly supports its customers with the implementation.

Tango Device Server User's Guide

More information about TANGO

Robot Operating System (ROS)

The Robot Operating System (ROS) is a flexible framework for developing software for robotics. It is a set of tools, software libraries, and rules that help you build and control complex robot applications.

For support, PI offers a ROS driver with which PI hexapods can be integrated into a ROS environment. The PI hexapods can comfortably be controlled with it by using the well known mechanisms from ROS. ROS additionally offers the possibility to visualize and simulate the application. For certain hexapods, models exist that are automatically available when the ROS driver is downloaded.

The download is available on the GitHub website:

github.com

 

More information can be found on the ROS website:

ROS.org

External Links

In order to use special functions for piezo systems in PIMikroMove, the LabWindows/CVI Run-Time Engine may be required; it can be found here:

LabWindows/CVI Run-Time Engine

 

The installation of the Microsoft Security Update for USB Drivers is recommended for Windows computers which do not have an internet connection:

Microsoft Security Update