18 int acc = 100 * speed;
22 cerr <<
"There was an error with the connection." << endl;
32 sprintf(buf,
"SPA=%d", speed);
35 sprintf(buf,
"ACA=%d", acc);
38 sprintf(buf,
"DCA=%d", acc);
41 cout <<
"Begin Position Tracking with speed " << speed;
42 cout <<
". Enter a non-number to exit.\n";
48 cout <<
"Enter a new position:\n";
53 cout <<
"Position Tracking has exited\n";
58 sprintf(buf,
"PAA=%d", position);
66 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.
GCLIB_DLL_EXPORTED GReturn GCALL GCmd(GCon g, GCStringIn command)
Wrapper around GCommand for use when the return value is not desired.
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().
#define G_CONNECTION_NOT_ESTABLISHED
Function was called with no connection.
void e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.
GReturn position_tracking(GCon g, int speed=5000)
Puts controller into Position Tracking Mode and accepts user-entered positions.