![]() |
gclib 2.1.20
Galil Communications Library
|
Manage a Galil controller More...
Topics | |
Communication | |
Send commands | |
Memory | |
Manage controller memory, such as program and arrays | |
Unsolicited Data | |
Receive messages, interrupts, and data records | |
Functions | |
GCLIB_DLL_EXPORTED GCLIB_DEPRECATED GReturn GCALL | GUtility (GCon g, GOption request, GMemory memory1, GMemory memory2) |
Provides read/write access to driver settings and convenience features based on the request variable. | |
GCLIB_DLL_EXPORTED GReturn GCALL | GWaitForBool (GCon g, GCStringIn predicate, int trials) |
Blocking call that returns when the controller evaluates the predicate as true. | |
GCLIB_DLL_EXPORTED GReturn GCALL | GMotionComplete (GCon g, GCStringIn axes) |
Blocking call that returns once all axes specified have completed their motion. | |
GCLIB_DLL_EXPORTED GCLIB_DEPRECATED GReturn GCALL GUtility | ( | GCon | g, |
GOption | request, | ||
GMemory | memory1, | ||
GMemory | memory2 ) |
Provides read/write access to driver settings and convenience features based on the request variable.
g | Connection's handle. |
request | Defines the request. Input/Output and type of memory are implicit in the value of request. The following lists the supported request values. |
--timeout
switch.memory1
is output and must be an unsigned short*
.memory2
is ignored, use null.memory1
is input. If nonnull, value must be a short*
holding the override, in milliseconds, for the timeout. Write G_USE_INITIAL_TIMEOUT
to use initial timeout. If null, no write occurs.memory2
is output. If nonnul, value must be a short*
which will be filled with the current override. G_USE_INITIAL_TIMEOUT
indicates initial timeout used. If null, no read occurs. memory2
is processed before 'memory1`.memory1
is output, and must be a char*
. Data will be null terminated, even if the data must be truncated to do so.memory2
is input and must be an unsigned int*
holding the length of the buffer in memory1
.memory1
is output and must be a char*
. Data will be null terminated, even if the data must be truncated to do so.memory2
is input and must be an unsigned int*
holding the length of the buffer in memory1
.memory1
is input and must be an unsigned int*
, units are milliseconds.memory2
is ignored, use null.-d
will be appended to each address to indicate these addresses are available via direct connection. See G_UTIL_GCAPS_ADDRESSES
for addresses through gcaps.memory1
is output and must be a char*
. Data will be null terminated, even if the data must be truncated to do so.memory2
is input and must be an unsigned int*
holding the length of the buffer in memory1
.memory1
is output and must be a char*
. Data will be null terminated, even if the data must be truncated to do so.memory2
is input and must be an unsigned int*
holding the length of the buffer in memory1
.memory1
is input and must be a char*
containing the null terminated address that is to be assigned. e.g. "192.168.0.43"
.memory2
is input and must be a char*
containing the null terminated controller MAC address. e.g. "00:50:4C:20:01:23"
.memory1
is ignored, use null.memory2
is ignored, use null.memory1
is input and must be a char*
containing the null terminated address that is to be pinged. e.g. "192.168.0.43"
.memory2
is output and must be an int*
. The value will be set to zero if the ping times out, and nonzero if a ping reply is returned.memory1
is output and must be a char*
. Data will be null terminated, even if the data must be truncated to do so.memory2
is input and must be an unsigned int*
holding the length of the buffer in memory1
.memory1
is output and must be a char*
. Data will be null terminated, even if the data must be truncated to do so.memory2
is input and must be an unsigned int*
holding the length of the buffer in memory1
.memory1
is output and must be a char*
. Data will be null terminated, even if the data must be truncated to do so.memory2
is input and must be an unsigned int*
holding the length of the buffer in memory1
.memory1
is output and must be a char*
. Data will be null terminated, even if the data must be truncated to do so.memory2
is input and must be an unsigned int*
holding the length of the buffer in memory1
.memory1
is input and must be a char*
containing the null terminated address that is to be assigned. e.g. "192.168.0.43"
.memory2
is input and must be a char*
containing the null terminated controller MAC address. e.g. "00:50:4C:20:01:23"
.memory1
is input and must be a char*
containing the null terminated address that is to be pinged. e.g. "192.168.0.43"
.memory2
is output and must be an int*
. The value will be set to zero if the ping times out, and nonzero if a ping reply is returned.memory1 | An untyped pointer to data required for request. The data type is defined by the request variable. |
memory2 | An untyped pointer to data required for request. The data type is defined by the request variable. |
See the following functions from gclibo, the open source portion, for implementation of several GUtility() requests.:
GCLIB_DLL_EXPORTED GReturn GCALL GWaitForBool | ( | GCon | g, |
GCStringIn | predicate, | ||
int | trials ) |
Blocking call that returns when the controller evaluates the predicate as true.
Polls the message command (MG) to check the value of predicate. Polling will continue until the controller responds with a nonzero value or the number of polling trials is reached.
The amount of time until the function fails with G_GCLIB_POLLING_FAILED is roughly (trials * POLLINGINTERVAL) milliseconds.
g | Connection's handle. |
predicate | A null-terminated string containing the predicate to be polled. The predicate will be enclosed in parentheses and used in the command MG (predicate) to return the value. |
trials | The number of polling cycles to perform looking for a nonzero value. Use -1 to poll indefinitely. |
See GMotionComplete() for an example.
GCLIB_DLL_EXPORTED GReturn GCALL GMotionComplete | ( | GCon | g, |
GCStringIn | axes ) |
Blocking call that returns once all axes specified have completed their motion.
Although using the _BGm operand is the most generally compatible method, there are higher-performance ways to check for motion complete by using the data record, or interrupts. See examples x_dr_motioncomplete() and x_ei_motioncomplete().
g | Connection's handle. |
axes | A null-terminated string containing a multiple-axes mask. Every character in the string should be a valid argument to MG_BGm, i.e. XYZWABCDEFGHST. |
See x_gmotioncomplete.cpp for an example.