33 cerr <<
"Incorrect number of arguments provided\n";
34 cerr <<
"Usage: position_tracking_example.exe <ADDRESS> <SPEED=5000>\n";
36 return GALIL_EXAMPLE_ERROR;
51 cerr <<
"An invalid speed was entered. "
52 "Please enter a valid integer for speed.\n"
53 "Usage: position_tracking_example.exe <ADDRESS> <SPEED=5000>\n";
55 return GALIL_EXAMPLE_ERROR;
71 return GALIL_EXAMPLE_ERROR;
75 return GALIL_EXAMPLE_OK;
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.
void * GCon
Connection handle. Unique for each connection in process. Assigned a non-zero value in GOpen().
GCLIB_DLL_EXPORTED GReturn GCALL GOpen(GCStringIn address, GCon *g)
Open a connection to a Galil Controller.
int main(int argc, char *argv[])
Main function for Commands Example.
void e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.
void error(GCon g, GReturn rc)
An example of error handling and debugging information.
GReturn position_tracking(GCon g, int speed=5000)
Puts controller into Position Tracking Mode and accepts user-entered positions.
int pause()
Pauses console apps for a user key stroke.
GReturn vector(GCon g, char *file)
Puts controller into Vector Mode and accepts a file defining vector points.