27 char buf[G_SMALL_BUFFER];
30 cerr <<
"There was an error with the connection." << endl;
31 return G_CONNECTION_NOT_ESTABLISHED;
42 e(GMotionComplete(g,
"A"));
51 char instructions[] =
"Enter a character on the keyboard to change the" 52 " motor's speed:\n<q> Quit\n<a> -2000 counts/s\n" 53 "<s> -500 counts/s\n<d> +500 counts/s\n<f> " 54 "+2000 counts/s\n<r> Direction Reversal\n";
64 sprintf(buf,
"JGA=%d", speed);
67 cout <<
"Jog Speed: " << speed <<
"\n";
70 sprintf(buf,
"Jog Speed: %d\n", speed);
100 e(GMotionComplete(g,
"A"));
102 return GALIL_EXAMPLE_OK;
GReturn jog(GCon g)
Puts controller into Jog Mode and accepts user input to adjust the speed.
void e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.