Hardware Reference
In-Depth Information
/*-----------------------------------------------------------*/
/* force -- reads the force sensor and puts data in a cab */
/*-----------------------------------------------------------*/
proc
force()
float
*fvect;
/* pointer to cab data */
while (1) {
fvect = reserve(fdata);
read force sensor(fvect);
putmes(fvect, fdata);
end cycle();
}
}
/*-----------------------------------------------------------*/
/* control -- gets data from cabs and sends robot set points */
/*-----------------------------------------------------------*/
proc
control()
float
*fvect, *alfa;
/* pointers to cab data */
float
x[6];
/* robot set-points
*/
while (1) {
fvect = getmes(fdata);
alfa = getmes(angle);
control law(fvect, alfa, x);
send robot(x);
unget(fvect, fdata);
unget(alfa, angle);
end cycle();
}
}
Search WWH ::




Custom Search