PI Software Tools for Precision Motion Control / Positioning

For LabView, C++, VB, Matlab, Image Acquisitiong Packages, NI DAC Cards, .....

PI provides high-level, robust, easy-to-use software tools for fast, seamless integration of motion systems into application control software. 

Choose from a Topic Group below, or scroll to see all Topic Groups

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.

Hexapod Simulation Tool

The limits of the workspace of parallel kinematics vary depending on the current position (translational and rotational coordinates), the current coordinates of the pivot point, and the chosen coordinate system. The scope of delivery of the PI hexapod software includes a program that can be used to comfortably calculate these limits and display them graphically. Mechanical problems can, therefore, be localized well before setting up the application.

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 (translation and rotation coordinates) of the motion platform as well as
  • the forces and torques which act on the motion platform of the hexapod.

 

These influencing factors can be simulated with the PI Hexapod Simulation Tool and possible issues can be solved early with the help of experienced PI sales engineers.

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 it to be used, the following third-party installation is required:

 

QEMU

QEMU is a free virtualization software which can emulate the entire hardware of the controller. Installation programs for Windows are available here: 32 bit / 64 bit.

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#, VB.NET
  • Python
  • MATLAB
  • NI LabVIEW

 

For less common programming languages such as Visual Basic (VB) 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#, VB.NET

For text-based languages, such as C, C++, C#, and VB.NET, an API is available that allows the control of PI controllers from propriety programs. This API is available as dynamic library for the following operating systems: Windows, Linux, macOS, 32/64 bit. 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 can be used starting with Python 2.7 or Python 3.4 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.

PI is a Product Alliance Partner of National Instruments. This ensures high-quality solutions and an up-to-date knowledge of the PI developers at all times.

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.

All PI user programs as well as libraries and drivers for the programming languages additionally offer logging possibilities. The communication with the controller is logged with a time stamp therefore making an analysis of the time behavior possible.

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 at: micro-manager.org/wiki/PI_GCS_2


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: www.aps.anl.gov/epics/modules/manufacturer.php. 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: www.aps.anl.gov/bcda/synApps/motor/. The communication is implemented with the modules available in EPICS.

 

 


ScanImage

ScanImage supports some PI controllers; they are listed at:

scanimage.vidriotechnologies.com/display/SI2016/Supported+Microscope+Hardware)).

PI has not developed or tested this implementation.

External Links

In order to use special functions for piezo systems in PIMikroMove, the Labwindows CVI Runtime Engine may be required; it can be found here:

www.ni.com/download/labwindowscvi-run-time-engine-2012/3032/en/

 

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

www.microsoft.com/en-US/download/details.aspx

PIUpdateFinder

The PI software is continuously improved and updated. To keep it up to date, there is a program designed and developed by PI, the so called "PIUpdateFinder". It is part of every software package. The PIUpdateFinder searches online for updates of all PI software components installed on the customer's computer. This program is part of every software package.

PIUpdateFinder

Version / Date
PIUpdateFinder / 2018-07
Document language English
zip - 7 MB