Creating Custom Software Interfaces
Galil provides programming tools so that users can develop their own custom software interfaces to a Galil
controller. These tools include the GalilTools Communication Library, ActiveX Toolkit, .NET API and DMCWin.
For new applications, Galil recommends the GalilTools Communication Libraries.
HelloGalil – Quick Start to PC programming
For programmers developing Windows applications that communicate with a Galil controller, the HelloGalil library
of quick start projects immediately gets you communicating with the controller from the programming language of
your choice. In the "Hello World" tradition, each project contains the bare minimum code to demonstrate
communication to the controller and simply prints the controller's model and serial numbers to the screen:
Figure 4.2. Sample program output
http://www.galilmc.com/support/hello_galil.html
GalilTools Communication Libraries
The GalilTools Communication Library (Galil class) provides methods for communication with a Galil motion
controller over Ethernet, RS-232 or PCI buses. It consists of a native C++ Library and a similar COM interface
which extends compatibility to Windows programming languages (e.g. VB, C#, etc).
A Galil object (usually referred to in sample code as "g") represents a single connection to a Galil controller.
For Ethernet controllers, which support more than one connection, multiple objects may be used to communicate
with the controller. An example of multiple objects is one Galil object containing a TCP handle to a DMC-40x0 for
commands and responses, and one Galil object containing a UDP handle for unsolicited messages from the
controller. If
is used to begin the automatic data record function, the library will open an additional UDP
handle to the controller (transparent to the user).
The library is conceptually divided into six categories:
1. Connecting and Disconnecting - functions to establish and discontinue communication with a controller.
2. Basic Communication - The most heavily used functions for command-and-response and unsolicited
messages.
3. Programs - Downloading and uploading embedded programs.
4. Arrays - Downloading and uploading array data.
5. Advanced - Lesser-used calls.
6. Data Record - Access to the data record in both synchronous and asynchronous modes.
C++ Library (Windows and Linux)
Both Full and Lite versions of GalilTools ship with a native C++ communication library. The Linux version
(libGalil.so) is compatible with g++ and the Windows version (Galil1.dll) with Visual C++ 2008. Contact Galil if
another version of the C++ library is required. See the
and the hello.cpp example in /lib.
Chapter 4 Software Tools and Communication
•
65
DMC-40x0 User Manual
Summary of Contents for DMC-4040
Page 54: ...Chapter 3 Connecting Hardware 45 DMC 40x0 User Manual...
Page 55: ...DMC 40x0 User Manual Chapter 3 Connecting Hardware 46...
Page 56: ...Chapter 3 Connecting Hardware 47 DMC 40x0 User Manual...
Page 73: ...Figure 4 1 GalilTools DMC 40x0 User Manual Chapter 4 Software Tools and Communication 64...
Page 185: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 7 Application Programming 176...
Page 205: ...THIS PAGE LEFT BLANK INTENTIONALLY DMC 40x0 User Manual Chapter 10 Theory of Operation 196...
Page 222: ...Step 2 Remove ICM s Appendices 213 DMC 40x0 User Manual...
Page 232: ...DMC 4080 Steps 4 and 5 Step 4 Replace ICM s Appendices 223 DMC 40x0 User Manual...