Skip to main content

The gclib API provides the foundational programming interface to develop software applications with Galil motion controllers and PLCs. The provided interfaces and examples makes it simple to develop software applications in many different languages ranging from very simple implementation requiring little code to C-based development designed for speed and portability.

Example Applications

Click here to view in-depth C/C++ examples that will demonstrate how to use the basics of gclib, such as connecting to the controller and issuing commands, as well as more advanced topics like assigning a controller an IP Address and monitoring interrupts.

Example Description
Commands Example Demonstrates various uses of GCommand() and GUtility().
Messages Example Demonstrates how to receive messages from the controller and detect differences in Trace and crashed code.
Position Tracking Example Puts controller into Position Tracking Mode and accepts user-entered positions.
Jog Example Puts controller into Jog Mode and accepts user input to adjust the speed.
Vector Mode Example Puts controller into Vector Mode and accepts a file defining vector points.
IP Assigner Example Assigns controller an IP Address given a serial number and a 1 byte address.
Motion Complete Example Uses interrupts to track when the motion of controller is completed.
Record Position Example Record user's training and saves to a text file.
Contour Example Record user's training and plays back training through contour mode.

Click here to download download the latest version of gclib to get these examples.

Can't find what you need? Email with a description of the example that will help your application.

Other Languages / Compilers

The following example applications demonstrate how to use gclib functions in various programming languages. These are intended to show each of the functions and their proper use to base new software applications using Galil hardware.

Programming Language View Example
C/C++ Microsoft Visual Studio View
C/C++ MinGW gcc/g++ View
C/C++ gcc/g++ View
C/C++ clang OSX View
Borland Embarcadero C++ View
Microsoft Visual Studio VB.NET View
Microsoft Visual Studio C#.NET View
Python View
Java View

Don't see your preferred language/platform? Contact Galil Applications for assistance.