34 cerr <<
"There was an error with the connection." << endl;
55 char instructions[] =
"Enter a character on the keyboard to change the"
56 " motor's speed:\n<q> Quit\n<a> -2000 counts/s\n"
57 "<s> -500 counts/s\n<d> +500 counts/s\n<f> "
58 "+2000 counts/s\n<r> Direction Reversal\n";
68 sprintf(buf,
"JGA=%d", speed);
71 cout <<
"Jog Speed: " << speed <<
"\n";
74 sprintf(buf,
"Jog Speed: %d\n", speed);
106 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 jog(GCon g)
Puts controller into Jog Mode and accepts user input to adjust the speed.