Programming, Interfaces, and Integration

Customers can write their own programs so that PI controllers can be seamlessly integrated into their application. For this purpose, various libraries and drivers are available that allow access to the controller in form of encapsulated function calls. With little effort, it is possible to set up a connection and communicate with the controller, independently of the controller's communication interface.

The following libraries and drivers for common programming languages and programs are available in the comprehensive software package PI Software Suite of the controller:

C, C++, C#

For text-based languages such as C, C++, and C#, an Application Programming Interface (API) is available to directly control controllers from propriety programs. This API is available as a dynamic library for Windows or for Linux. A dynamic library can be provided for macOS on request. It allows for an easy connection to the respective development environment.

Python

PI provides PIPython, a collection of Python modules which are used to directly control controllers using Python. Therefore, the power of this programming language is combined with the flexibility of PI's proprietary GCS commands. Furthermore, PIPython offers a variety of useful auxiliary support functions. Some controllers from PI allow Python scripts to be run on them to solve complex tasks independently, i.e., without a connection to the Host PC.

PIPython online manual

Matlab

Controllers can be directly controlled in MATLAB using the PI MATLAB driver. For this purpose, no additional MATLAB toolboxes are necessary. The installation includes a version for Windows, a version for Linux operating systems can be provided on request.

NI LabVIEW

The PI GCS NI LabVIEW driver set offers complete support of NI LabVIEW as a programming language for customer-specific applications. As well as practical examples, it offers a complete driver package including a comfortable configuration VI. As 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.

For less common programming languages, you can quickly and easily ask PI for custom solutions:

 

Samples

Completed examples, 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. On request, examples can be created and extended to solve customer-specific problems.

Since the range of supported software functions depends on the functions of the controller, please refer to the corresponding product data sheets and manuals.

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 that 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.