POST CTRLPARAMS(3)

NAME
POST_CTRLPARAM, LOAD_CTRLPARAMS -- RCI CHG macros to load control parameters to the robot controller.

USAGE
#include <rci.h>

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

LOAD_CTRLPARAMS(rbt)
   RCI_RBT *rbt;

ARGUMENTS

rbt --
    Pointer to RCI robot structure.

num --
    Parameter number.

val --
    Value associated with the parameter.

mask --
    Bitmask describing the joints for which this parameter setting is to be made.

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 HOW_MAXPARAM parameters per joint. Typically, parameters will represent things like PID control loop gains.

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

LOAD_CTRLPARAMS() causes the parameter specifications set up by POST_CTRLPARAM() to be flushed to the robot controller during the same cycle. The parameter settings are then copied into the ctrlParams field of the HOW structure.

DIAGNOSTICS
Errors will result in an abort condition. Defined abort conditions include:

ETooMany --
    Too many HOW_MAXPARAM parameter postings were made before calling LOAD_CTRLPARAMS().

BUGS
This feature is highly site dependent!

SEE ALSO
CHG(3), HOW(3).