37 e(
GCmd(g,
"PA 0, 0"));
51 cout <<
"Error: The two datasets are not the same size\n";
52 return GALIL_EXAMPLE_ERROR;
65 e(
GCmd(g,
"CD 0,0=0"));
70 return GALIL_EXAMPLE_OK;
GCLIB_DLL_EXPORTED GReturn GCALL GMotionComplete(GCon g, GCStringIn axes)
Blocking call that returns once all axes specified have completed their motion.
int GReturn
Every function returns a value of type GReturn. See gclib_errors.h for possible values.
#define G_SMALL_BUFFER
Most reads from Galil are small. This value will easily hold most, e.g. TH, TZ, etc.
GCLIB_DLL_EXPORTED void GCALL GSleep(unsigned int timeout_ms)
Uses GUtility() and G_UTIL_SLEEP to provide a blocking sleep call which can be useful for timing-base...
void * GCon
Connection handle. Unique for each connection in process. Assigned a non-zero value in GOpen().
GCLIB_DLL_EXPORTED GReturn GCALL GCmdI(GCon g, GCStringIn command, int *value)
Wrapper around GCommand that provides the return value of a command parsed into an int.
GCLIB_DLL_EXPORTED GReturn GCALL GCmd(GCon g, GCStringIn command)
Wrapper around GCommand for use when the return value is not desired.
void e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.
GReturn contour(GCon g, char *fileA, char *fileB)
Record user's training and plays back training through contour mode.
bool load_buf(GCon g, const std::vector< int > &positions_A, const std::vector< int > &positions_B, int capacity, int &cmd)
Loads contour buffer with commands from the given text file.
std::vector< int > csv_to_vector(ifstream &is)
Converts a file of comma separated values to a vector.
GReturn vector(GCon g, char *file)
Puts controller into Vector Mode and accepts a file defining vector points.
GReturn record_position(GCon g, char *fileA, char *fileB)
Record user's training and saves to a text file.