•
a terminal control for sending commands and editing programs
•
a polling window for displaying responses from the controller such as position and speed
•
a storage scope control for plotting real time trajectories such as position versus time or X versus Y
•
a send file control for sending contour data or vector DMC files
•
a continuous array capture control for data collection, and for teach and playback
•
a graphical display control for monitoring a 2-D motion path
•
a diagnostics control for capturing current configurations
•
a display control for input and output status
•
a vector motion control for tool offsets and corner speed control
For more detailed information on the ActiveX Toolkit, please refer to the user manual at
http://www.galilmc.com/support/manuals/activex.pdf
.
DMCWin Programmers Toolkit
DMCWin is a programmer's toolkit for C/C++ and Visual Basic users. The toolkit includes header files for the Galil
communications API, as well as source code and examples for developing Windows
®
programs that communicate to
Galil Controllers. The Galil communications API includes functions to send commands, download programs,
download/upload arrays, access the data record, etc. For a complete list of all the functions, refer to the DMCWin
user manual at
http://www.galilmc.com/support/manuals/dmcwin.pdf
.
This software package is free for download and is available at
http://www.galilmc.com/support/download.html
.
Galil Communications API with C/C++
When programming in C/C++, the communications API can be used as included functions or
through a class library. All Galil communications programs written in C must include the
DMCCOM.H file and access the API functions through the declared routine calls. C++ programs
can use the DMCCOM.H routines or use the class library defined in DMCWIN.H.
After installing DMCWin into the default directory, the DMCCOM.H header file is located in
C:\Program Files\Galil\DMCWIN\INCLUDE. C++ programs that use the class library need the
files DMCWIN.H and DMCWIN.CPP, which contain the class definitions and implementations
respectively. These can be found in the C:\ProgramFiles\Galil\DMCWIN\CPP directory.
To link the application with the DLL’s, the DMC32.lib file must be included in the project and is
located at C:\Program Files\Galil\DMCWIN\LIB
Example: A simple console application that sends commands to the controller
To initiate communication, declare a variable of type HANDLEDMC (a long integer) and pass the address of that
variable in the DMCOpen() function. If the DMCOpen() function is successful, the variable will contain the handle
to the Galil controller, which is required for all subsequent function calls. The following simple example program
written as a Visual C console application tells the controller to move the X axis 1000 encoder counts. Remember to
add DMC32.LIB to your project prior to compiling.
#include <windows.h>
#include <dmccom.h>
long rc;
HANDLEDMC hDmc;
HWND hWnd;
int main(void)
{
// Connect to controller number 1
50
•
Chapter 4 - Software Tools and Communications
DMC-1600