11 cout <<
"\n************************************************************************\n";
12 cout <<
"Example GMotionComplete() usage\n";
13 cout <<
"************************************************************************\n";
23 x_e(
GCmdT(g,
"RP", buf,
sizeof(buf), &trimmed));
24 cout <<
"\nPosition: " << trimmed <<
'\n';
30 cout <<
"Beginning independent motion... ";
33 cout <<
"Motion Complete on A\n";
34 x_e(
GCmdT(g,
"RP", buf,
sizeof(buf), &trimmed));
35 cout <<
"Position: " << trimmed <<
'\n';;
40 x_e(
GCmdT(g,
"RP", buf,
sizeof(buf), &trimmed));
41 cout <<
"\nPosition: " << trimmed <<
'\n';;
49 cout <<
"Beginning vector motion... ";
52 cout <<
"Motion Complete on vector plane S\n";
53 x_e(
GCmdT(g,
"RP", buf,
sizeof(buf), &trimmed));
54 cout <<
"Position: " << trimmed <<
'\n';;
56 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 GCmdT(GCon g, GCStringIn command, GCStringOut trimmed_response, GSize response_len, GCStringOut *front)
Wrapper around GCommand that trims the response.
GCLIB_DLL_EXPORTED GReturn GCALL GCmd(GCon g, GCStringIn command)
Wrapper around GCommand for use when the return value is not desired.
void * GCon
Connection handle. Unique for each connection in process. Assigned a non-zero value in GOpen().
void x_e(GReturn rc)
A trivial, C++ style return code check used in Galil's examples and demos.
int x_gmotioncomplete(GCon g)
Example GMotionComplete() usage.