\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{rcclSetModes}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{rcclSetModes}},
{\tt \manName{rcclClearModes}},
{\tt \manName{rcclPutModes}},
{\tt \manName{rcclGetModes}},
{\tt \manName{rcclGetActiveModes}}
-- set operating modes for an RCCL manipulator.

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

unsigned long rcclSetModes (mnp, mask)
  MANIP *mnp;
  unsigned long mask;

unsigned long rcclClearModes (mnp, mask)
  MANIP *mnp;
  unsigned long mask;

unsigned long rcclPutModes (mnp, mask)
  MANIP *mnp;
  unsigned long mask;

unsigned long rcclGetModes (mnp, mask)
  MANIP *mnp; 
  unsigned long mask;

unsigned long rcclGetActiveModes (mnp, mask)
  MANIP *mnp; 
  unsigned long mask; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt mask} --}
Bitmask describing the operating modes to be set or cleared.
\manItem{{\tt mnp} --}
Manipulator reference structure.
\manSection{RESTRICTIONS}
{\tt rcclSetModes()}, {\tt rcclClearModes()}, and
{\tt rcclPutModes()} must be called from the planning level.
\manSection{DESCRIPTION}
It is possible to control certain operating characteristics of an RCCL
manipulator by setting or clearing various mode bits.

{\tt rcclSetModes()} sets the indicated mode bits for a
particular manipulator and returns a mask describing
their previous settings.

{\tt rcclClearModes()} clears the indicated mode bits for a
particular manipulator and returns a mask describing
their previous settings.

{\tt rcclPutModes()} sets all of the modes bits to the indicated value
and returns a mask describing their previous settings.

{\tt rcclGetModes()} returns the settings of the mode bits
specified by {\tt mask}. {\tt rcclGetModes(\~0)} will return all
the mode settings.

Some mode bits do not take effect (after being changed) until the start of the
next requested motion. Because of this, it is important to be able
to obtain the mode bit settings for the currently executing manipulator
motion.

{\tt rcclGetActiveModes()} returns the settings of the mode bits
specified by {\tt mask}, for the motion currently executing on the
manipulator.

The mode bits are defined in {\tt <rccl.h>}. 
The ones currently implemented are:

\manItem{{\tt TRACKING_MODE} --}
Causes RCCL to continue tracking the most recently specified motion target
after all motions have been executed. If tracking mode is not enabled, then
when all motion requests have been executed, the manipulator halts at
the last target position. If tracking mode is enabled,
then the trajectory generator instead issues another motion request 
(with an indefinite time 
duration) to the last target position, which will
continue to track this target position. The overall effect
is similiar to a {\tt stop()} command.
The tracking motion will terminate as soon as another motion 
request is received for the manipulator.
A change of this mode bit takes effect immediately. Its default setting is 0.

\manItem{{\tt INTEGRATE_MODE} --}
{\tolerance=10000
Enables integration in the robot's servo controllers. This 
increases the 
static positioning accuracy but may also increase control behaviours
such as overshoot.
Integration is not defined
for virtual manipulators, and may not be implemented for real robots on
some systems.
A change of this mode bit takes effect immediately. Its default setting is 0.

}

\manItem{{\tt T6O_EVAL} --}
Enables updating of the {\tt j6o} and {\tt t6o} fields
in the {\tt MANIP} data structure.
{\tt j6o} is the observed value of the manipulator joint values,
read back from the robot controller each control cycle.
{\tt t6o} is the observed value of the manipulator {\rm T6}
transform, computed by
doing forward kinematics on {\tt j6o}. The updating is
optional since it can be time-consuming (for instance, it will add another
millisecond or so to the trajectory computation time on a microVAX).
Integration is not defined for virtual manipulators.
A change of this mode bit takes effect immediately. Its default setting is 0.

\manItem{{\tt GRAVITY_FEEDFORWARD} --}
Causes the trajectory generator to compute the gravity
loading torques for the manipulator joints (and possibly other dynamic
terms as well) and feed them forward to the servo controllers. 
Gravity feedforward is not defined
for virtual manipulators, and may not be implemented for real robots on
some systems.
A change of this mode bit takes effect immediately. Its default setting is 0.

\manItem{{\tt COMPLETE_AT_TB} --}
Causes the trajectory generator to use the {\it midpoint} of the
transition between motions as
the ``official'' motion start/stop time. Otherwise, the official
start/stop time is taken to be the {\it beginning} of the transition
between motions. The official start/stop time is when the previous
motion is considered to end and the next motion is considered to
begin. It is the point at which values examined by such routines as
{\tt motionStatus()}, {\tt motionStartCode()}, and
{\tt motionStopCode()} will be updated.
It is also the point at which
transform evaluations requested by {\tt updateTrans()}
will take place.
A change of this mode bit takes effect at the start of the next requested
motion. Its default setting is 1.

\manSection{DIAGNOSTICS}
{\tt rcclSetModes()}, {\tt rcclClearModes()}, and
{\tt rcclPutModes()} will abort the program if called from the control
level.
\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt rcclCreate(3)}, {\tt MANIP(3)}.
\manEnd
\end
