\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{POST CTRLPARAMS}{3}
\manSection{NAME}
{\raggedright
{\tt \manName{POST_CTRLPARAM}},
{\tt \manName{LOAD_CTRLPARAMS}}
-- RCI {\it CHG} macros to load control parameters to the robot controller.

}
\manSection{USAGE}
\cverbatim
#include <rci.h>

POST_CTRLPARAM(rbt, num, val, mask)
   RCI_RBT *rbt;
   int num, val;
   unsigned long mask;

LOAD_CTRLPARAMS(rbt)
   RCI_RBT *rbt; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt rbt} --}
Pointer to RCI robot structure.
\manItem{{\tt num} --}
Parameter number.
\manItem{{\tt val} --}
Value associated with the parameter.
\manItem{{\tt mask} --}
Bitmask describing the joints for which this parameter setting is to be made.
\manSection{DESCRIPTION}
This is a highly robot dependent feature which allows a program to send
down information to the robot controller adjusting various characteristics
associated with the control of each joint. Not all controllers may permit
this feature, and the interpretation of the control parameters will vary
from one to the other.

These macros may be called from any part of an RCI program.

RCI supports {\tt HOW_MAXPARAM} parameters per joint. Typically,
parameters will represent things like PID control loop gains. 

{\tt POST_CTRLPARAM()} requests that 
parameter {\tt num} be set 
to {\tt val} for the joints indicated by {\tt mask}.
The requests will not be sent to the robot controller until
the cycle during which {\tt LOAD_CTRLPARAMS()} is called.
Up to {\tt HOW_MAX\-PAR\-AM} such postings may be made up to and during the
cycle that {\tt LOAD_CTRL\-PAR\-AMS()} is called.
If {\tt num} is greater than or equal to {\tt HOW_MAX\-PAR\-AM}, the
call is ignored.

{\tt LOAD_CTRL\-PAR\-AMS()} causes the parameter specifications
set up by {\tt POST_CTRL\-PAR\-AM()} to be flushed to the robot
controller during the same cycle. The parameter settings are then
copied into the {\tt ctrlParams} field of the {\tt HOW} structure.
\manSection{DIAGNOSTICS}
Errors will result in an abort condition. Defined abort conditions include:

\manItem{{\tt ETooMany} --}
Too many {\tt HOW_MAXPARAM} parameter postings were made before
calling {\tt LOAD_CTRLPARAMS()}.

\manSection{BUGS}
This feature is {\bf highly} site dependent!
\manSection{SEE ALSO}
\raggedright
{\tt CHG(3)}, {\tt HOW(3)}.
\manEnd
\end
