\input manualMacros.tex
\manBegin
\manPageInfo{RCI Reference Manual}{}{}
\manTitle{SET CHECKING}{3}
\manSection{NAME}
\tolerance = 400
{\tt \manName{SET_CHECKING}},
{\tt \manName{SET_POWER_ON_RELEASE}}
-- RCI {\it CHG} macros to set robot interface attributes.
\manSection{USAGE}
\cverbatim
#include <rci.h>

SET_CHECKING(rbt, mask)
   RCI_RBT *rbt;
   unsigned long mask;

SET_POWER_ON_RELEASE(rbt, val)
   RCI_RBT *rbt;
   int val; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt rbt} --}
Pointer to RCI robot structure.
\manItem{{\tt mask} --}
Mask indicating which checking conditions should be enabled or disabled.
\manItem{{\tt val} --}
Boolean value: true if non-zero.
\manSection{DESCRIPTION}
{\tt SET_CHECKING()} enables or disables various robot limit checking
modes on the robot controller, depending on what bits are set in its
mask argument. Not all checking modes may be implemented.
The macro may be called from any part of an RCI program.

The following checking modes are defined:

\cverbatim
        CHK_MAXPOS   0x0001  /* maximum position exceeded */
        CHK_MAXVEL   0x0002  /* maximum velocity exceeded */
        CHK_MAXTOR   0x0004  /* maximum torque exceeded */
        CHK_REQPOS   0x0008  /* requested position past limits */
        CHK_REQVEL   0x0010  /* requested velocity past limits */
        CHK_REQTOR   0x0020  /* requested torque past limits */ @endcverbatim
The first three checking conditions are made with respect to information
that is read back from the robot. The last three checking conditions are made
with respect to commands being sent to the robot. Limit values associated
with the checking conditions are defined in the robot's {\tt JLS} structure.

{\tt SET_CHECKING()} enables the check conditions specified by 
the bitmask {\tt mask}. The set value may be
read back in the {\tt checking} field of the {\tt HOW} structure.

{\tt SET_POWER_ON_RELEASE()} instructs the robot control interface
to keep robot power {\it on} after the control task has been released
(the default is to shut robot power off). This feature is enabled
by calling the macro with a true (non-zero) value, and cleared with
a false value. The setting may be read back in the {\tt power\-On\-Release}
field of the {\tt HOW} structure.

\manSection{DIAGNOSTICS}
When a check condition is violated, an abort condition is raised.
\manSection{BUGS}
{\tt CHK_MAXTOR} is not implemented on many PUMA robots because there
are often no torque or current sensors available.
\manSection{SEE ALSO}
\raggedright
{\tt CHG(3)}, {\tt HOW(3)}.
\manEnd
\end
