Windows API Tool Kit
Galil's Windows API-DMCWIN32 (also available in Linux, DOS, QNX)
provides C libraries, sample programs, utilities, a complete terminal
program, and full documentation.With this kit, all Galil motion con-
trollers can be programmed using standard C/C++ compilers.The
kit is also compatible with the Galil ActiveX Tool Kit.
DLL API list:
COMMUNICATION
DMCOpen Open communications
DMCClose Close communications
DMCSendCW2OnClose Clears most significant bit of unsolicited messages
DMCCommand Send a command
DMCFastCommand Send command without waiting for response
DMCArrayDownload Download an array
DMCArrayUpload Upload an array
DMCDownloadFile Download a file from hard disk
DMCUploadFile Upload file to hard disk
DMCCompressFile Compress a Galil language program file
DMCDownloadFromBuffer Download file from buffer
DMCUploadToBuffer Upload file to buffer
DMCSendFile Send a file
DMCDownloadFirmwareFile Download firmware
DMCGetAdditionalResponse Read long response
DMCGetAdditionalResponseLen Read long response length
DMCGetUnsolicitedResponse Read card messages
DMCReadData Low level read function
DMCWriteData Low level write function
DMCClear Clear FIFO
DMCWaitForMotionComplete Wait for motion complete
DMCMasterReset Master reset controller
DMCReset Reset controller
DMCVersion Get firmware version
REGISTRY
DMCAddGalilRegistry Add a controller to the registry
DMCDeleteGalilRegistry Delete a controller from registry
DMCEditRegistry Registry Dialog (Requires DMCReg.ocx)
DMCEnumGalilRegistry Read entire registry
DMCGetGalilRegistryInfo Read registry for one controller
DMCModifyGalilRegistry Modify a registry entry
DMCGetControllerDesc Get a description of the controller
from the registry
BINARY COMMANDS
DMCBinaryCommand Send binary command
DMCCommand_AsciiToBinary Convert ASCII command to binary
DMCCommand_BinaryToAscii Convert a binary command to ASCII
DMCFile_AsciiToBinary Convert file of ASCII commands to binary
DMCFile_BinaryToAscii Convert file of binary commands to ASCII
DMCReadSpecialConversionFile Special conversion file
DMCSendBinaryFile Send a binary file
DATA RECORD
DMCRefreshDataRecord Request a new data record
DMCGetDataRecordByItemId Return part of the data record (preferred method)
DMCGetDataRecordItemOffsetById Get data record item offset
DMCGetDataRecordConstPointer Get pointer to data record
DMCGetDataRecordRevision Get version of record
DMCGetDataRecordArray Return all cached data record (1700, 1800 only)
DMCGetDataRecordConstPointerArray Return a const pointer to all cached
data records (1700, 1800 only)
DMCCopyDataRecord Copy data record into a structure
DMCGetDataRecordSize Returns number of bytes in data record
OTHER
DMCChangeInterruptNotification Notify for interrupt by handle or thread
DMCDiagnosticsOff Stop diagnostics
DMCDiagnosticsOn Start diagnostic file
DMCError Read error message
DMCGetHandle Return the controller handle
DMCSelectController Selection Dialog
DMCAssignIPAddress Assign the IP Address to an Ethernet controller
Example C Program tells the controller
to move the X-axis motor 1000 counts.
#include <windows.h>
#include <Dmccom.h>
long rc;
HANDLEDMC hDmc;
char szBuffer [64];
int main(void)
{
rc = DMCOpen(1,0,&hDmc);
rc = DMCCommand(hDmc,"PR1000;BGX;",szBuffer,
sizeof(szBuffer));
rc = DMCClose(hDmc);
return 0;
}
DMCWIN32 API
Programming Tools
SOFTW
ARE
92
www.galilmc.com / Galil Motion Control, Inc.