Go to the source code of this file.
Functions | |
LONG FAR GALILCALL | DMCOpen (USHORT usController, void *hwnd, PHANDLEDMC phdmc) |
Open communications with the Galil controller. More... | |
LONG FAR GALILCALL | DMCOpen2 (USHORT usController, LONG lThreadID, PHANDLEDMC phdmc) |
Open communications with the Galil controller. DMCOpen2 is a wrapper around DMCOpen. More... | |
LONG FAR GALILCALL | DMCClose (HANDLEDMC hdmc) |
Close communications with the Galil controller. More... | |
LONG FAR GALILCALL | DMCCommand (HANDLEDMC hdmc, PSZ pszCommand, LPCHAR pchResponse, ULONG cbResponse) |
Send a DMC command in ascii format to the Galil controller. More... | |
LONG FAR GALILCALL | DMCGetUnsolicitedResponse (HANDLEDMC hdmc, LPCHAR pchResponse, ULONG cbResponse) |
Query the Galil controller for unsolicited responses. More... | |
LONG FAR GALILCALL | DMCGetAdditionalResponseLen (HANDLEDMC hdmc, LPULONG pulResponseLen) |
Query the Galil controller for the length of additional response data. More... | |
LONG FAR GALILCALL | DMCGetAdditionalResponse (HANDLEDMC hdmc, LPCHAR pchResponse, ULONG cbResponse) |
Query the Galil controller for more response data. More... | |
LONG FAR GALILCALL | DMCVersion (HANDLEDMC hdmc, LPCHAR pchVersion, ULONG cbVersion) |
Get the version of the Galil controller. More... | |
LONG FAR GALILCALL | DMCDownloadFile (HANDLEDMC hdmc, PSZ pszFileName, PSZ pszLabel) |
Download a file to the Galil controller. More... | |
LONG FAR GALILCALL | DMCDownloadFromBuffer (HANDLEDMC hdmc, PSZ pszBuffer, PSZ pszLabel) |
Download from a buffer to the Galil controller. More... | |
LONG FAR GALILCALL | DMCUploadFile (HANDLEDMC hdmc, PSZ pszFileName) |
Upload a file from the Galil controller. More... | |
LONG FAR GALILCALL | DMCUploadToBuffer (HANDLEDMC hdmc, LPCHAR pchBuffer, ULONG cbBuffer) |
Upload to a buffer from the Galil controller. More... | |
LONG FAR GALILCALL | DMCArrayDownload (HANDLEDMC hdmc, PSZ pszArrayName, USHORT usFirstElement, USHORT usLastElement, LPCHAR pchData, ULONG cbData, LPULONG cbBytesWritten) |
Download an array to the Galil controller. More... | |
LONG FAR GALILCALL | DMCArrayUpload (HANDLEDMC hdmc, PSZ pszArrayName, USHORT usFirstElement, USHORT usLastElement, LPCHAR pchData, ULONG cbData, LPULONG pulBytesRead, SHORT fComma) |
Upload an array from the Galil controller. More... | |
LONG FAR GALILCALL | DMCRefreshDataRecord (HANDLEDMC hdmc, ULONG ulLength) |
Refresh the data record used for fast polling. More... | |
LONG FAR GALILCALL | DMCGetDataRecordConstPointer (HANDLEDMC hdmc, const char **pchDataRecord) |
Get a const pointer to the most recent data record. More... | |
OS Upgrade for Dmccom.h. Derived from original Dmccom.h. Comments have been updated and unnecessary code has been commented out.
All functions return an error code. DMCNOERROR (0) indicates function completed successfully. < 0 is a local error (see the error codes below).
Unsupported functions return appropriate errors.
LONG FAR GALILCALL DMCArrayDownload | ( | HANDLEDMC | hdmc, |
PSZ | pszArrayName, | ||
USHORT | usFirstElement, | ||
USHORT | usLastElement, | ||
LPCHAR | pchData, | ||
ULONG | cbData, | ||
LPULONG | cbBytesWritten | ||
) |
Download an array to the Galil controller.
The array must exist on the controller. Array data can be delimited by a comma or CR (0x0D) or CR/LF (0x0D0A).
hdmc | Handle to the Galil controller. |
pszArrayName | Array name to download to the Galil controller. |
usFirstElement | First array element. |
usLastElement | Last array element. |
pchData | Buffer to write the array data from. Data does not need to be NULL terminated. |
cbData | Length of the array data in the buffer. |
cbBytesWritten | Number of bytes written. |
LONG FAR GALILCALL DMCArrayUpload | ( | HANDLEDMC | hdmc, |
PSZ | pszArrayName, | ||
USHORT | usFirstElement, | ||
USHORT | usLastElement, | ||
LPCHAR | pchData, | ||
ULONG | cbData, | ||
LPULONG | pulBytesRead, | ||
SHORT | fComma | ||
) |
Upload an array from the Galil controller.
The array must exist on the controller. Array data will be delimited by a comma or CR (0x0D) depending of the value of fComma.
hdmc | Handle to the Galil controller. |
pszArrayName | Array name to upload from the Galil controller. |
usFirstElement | First array element. |
usLastElement | Last array element. |
pchData | Buffer to read the array data into. Array data will not be NULL terminated. |
cbData | Length of the buffer. |
pulBytesRead | Number of bytes read. |
fComma | 0 = delimit by "\r", 1 = delimit by ",". |
LONG FAR GALILCALL DMCClose | ( | HANDLEDMC | hdmc | ) |
Close communications with the Galil controller.
User must call close when done to disconnect from the controller. Failure to do so may result in the failure of future DMCOpen() calls until the controller/PC is reset.
hdmc | Handle to the Galil controller. |
LONG FAR GALILCALL DMCCommand | ( | HANDLEDMC | hdmc, |
PSZ | pszCommand, | ||
LPCHAR | pchResponse, | ||
ULONG | cbResponse | ||
) |
Send a DMC command in ascii format to the Galil controller.
Performs a command-and-response transaction with the hardware.
hdmc | Handle to the Galil controller. |
pszCommand | The command to send to the Galil controller. |
pchResponse | Buffer to receive the response data. If the buffer is too small to recieve all the response data from the controller, the error code DMCERROR_BUFFERFULL will be returned. The user may get additional response data by calling the function DMCGetAdditionalResponse. The length of the additonal response data may ascertained by calling the function DMCGetAdditionalResponseLen. If the response data from the controller is too large for the internal additional response buffer, the error code DMCERROR_RESPONSEDATA will be returned. Output only. |
cbResponse | Length of the buffer. |
LONG FAR GALILCALL DMCDownloadFile | ( | HANDLEDMC | hdmc, |
PSZ | pszFileName, | ||
PSZ | pszLabel | ||
) |
Download a file to the Galil controller.
hdmc | Handle to the Galil controller. |
pszFileName | File name to download to the Galil controller. |
pszLabel | Program label download destination. This argument is ignored if NULL. |
LONG FAR GALILCALL DMCDownloadFromBuffer | ( | HANDLEDMC | hdmc, |
PSZ | pszBuffer, | ||
PSZ | pszLabel | ||
) |
Download from a buffer to the Galil controller.
hdmc | Handle to the Galil controller. |
pszBuffer | Buffer of DMC commands to download to the Galil controller. |
pszLabel | Program label download destination. This argument is ignored if NULL. |
LONG FAR GALILCALL DMCGetAdditionalResponse | ( | HANDLEDMC | hdmc, |
LPCHAR | pchResponse, | ||
ULONG | cbResponse | ||
) |
Query the Galil controller for more response data.
There will be more response data available if the DMCCommand function returned DMCERROR_BUFFERFULL. Once this function is called, the internal additonal response buffer is cleared.
hdmc | Handle to the Galil controller. |
pchResponse | Buffer to receive the response data. Output only. |
cbResponse | Length of the buffer. |
LONG FAR GALILCALL DMCGetAdditionalResponseLen | ( | HANDLEDMC | hdmc, |
LPULONG | pulResponseLen | ||
) |
Query the Galil controller for the length of additional response data.
There will be more response data available if the DMCCommand function returned DMCERROR_BUFFERFULL.
hdmc | Handle to the Galil controller. |
pulResponseLen | Buffer to receive the additional response data length. Output only. |
LONG FAR GALILCALL DMCGetDataRecordConstPointer | ( | HANDLEDMC | hdmc, |
const char ** | pchDataRecord | ||
) |
Get a const pointer to the most recent data record.
using this method to access the information in the data record eliminates the copying necessary with DMCCopyDataRecord.
hdmc | Handle to the Galil controller. |
pchDataRecord | Const pointer to the data record. |
LONG FAR GALILCALL DMCGetUnsolicitedResponse | ( | HANDLEDMC | hdmc, |
LPCHAR | pchResponse, | ||
ULONG | cbResponse | ||
) |
Query the Galil controller for unsolicited responses.
Unsolicited messages output from programs running in the background on the Galil controller. The data placed in the user buffer (pchResponse) is NULL terminated.
hdmc | Handle to the Galil controller. |
pchResponse | Buffer to receive the response data. |
cbResponse | Length of the buffer. |
LONG FAR GALILCALL DMCOpen | ( | USHORT | usController, |
void * | hwnd, | ||
PHANDLEDMC | phdmc | ||
) |
Open communications with the Galil controller.
The handle to the Galil controller is returned in the argument phdmc.
usController | A number between 1 and 16. Up to 16 Galil controllers may be addressed per process. Maps to "number" attribute of controller tag in registry.xml. |
hwnd | Not used in Windows OS Upgrade version. Maintained to provide argument compatibility with the legacy version. |
phdmc | Buffer to receive the handle to the Galil controller to be used for all subsequent API calls. Users should declare a variable of type HANDLEDMC and pass the address of the variable to the function. Output only. |
LONG FAR GALILCALL DMCOpen2 | ( | USHORT | usController, |
LONG | lThreadID, | ||
PHANDLEDMC | phdmc | ||
) |
Open communications with the Galil controller. DMCOpen2 is a wrapper around DMCOpen.
The handle to the Galil controller is returned in the argument phdmc.
usController | A number between 1 and 16. Up to 16 Galil controllers may be addressed per process. Maps to "number" attribute of controller tag in registry.xml. |
lThreadID | Not used in Windows OS Upgrade version. Maintained to provide argument compatibility with the legacy version. |
phdmc | Buffer to receive the handle to the Galil controller to be used for all subsequent API calls. Users should declare a variable of type HANDLEDMC and pass the address of the variable to the function. Output only. |
LONG FAR GALILCALL DMCRefreshDataRecord | ( | HANDLEDMC | hdmc, |
ULONG | ulLength | ||
) |
Refresh the data record used for fast polling.
hdmc | Handle to the Galil controller. |
ulLength | Deprecated, set to zero. |
LONG FAR GALILCALL DMCUploadFile | ( | HANDLEDMC | hdmc, |
PSZ | pszFileName | ||
) |
Upload a file from the Galil controller.
hdmc | Handle to the Galil controller. |
pszFileName | File name to upload from the Galil controller. |
LONG FAR GALILCALL DMCUploadToBuffer | ( | HANDLEDMC | hdmc, |
LPCHAR | pchBuffer, | ||
ULONG | cbBuffer | ||
) |
Upload to a buffer from the Galil controller.
hdmc | Handle to the Galil controller. |
pchBuffer | Buffer of DMC commands to upload from the Galil controller. Output only. |
cbBuffer | Length of the buffer. |
LONG FAR GALILCALL DMCVersion | ( | HANDLEDMC | hdmc, |
LPCHAR | pchVersion, | ||
ULONG | cbVersion | ||
) |
Get the version of the Galil controller.
Galil Motion Controller DMC4020 Rev 1.2b (OSU) 192.168.0.43 Galil Motion Controller DMC1846 Rev 1.0c (OSU) GALILPCI1 Galil Motion Controller DMC4020 Rev 1.2b (OSU) COM1
hdmc | Handle to the Galil controller. |
pchVersion | Buffer to receive the version information. Output only. |
cbVersion | Length of the buffer. |