SET POWER ON(3)

NAME
SET_POWER_ON, SET_POWER_OFF, SET_INTEGRATION, SET_CALIBMODE, SET_CALIBFLAG -- RCI CHG macros to control robot operation.

USAGE
#include <rci.h>

SET_POWER_ON(rbt)
   RCI_RBT *rbt;

SET_POWER_OFF(rbt)
   RCI_RBT *rbt;

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

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

SET_CALIBFLAG(rbt, val)
   RCI_RBT *rbt;
   int val;

ARGUMENTS

rbt --
    Pointer to RCI robot structure.

mask --
    Bitmask describing which joints the attribute should be set for.

val --
    User defined value.

DESCRIPTION
These macros control various discrete aspects of the robot controller operation. They may be called from any part of an RCI program.

Some of these macros (especially those involving calibration) may not be implemented for a particular robot.

SET_POWER_ON() instructs the robot controller to turn power on during the next control cycle.

SET_POWER_OFF() instructs the robot controller to turn power off during the next control cycle.

When robot power is on, the power field of the HOW structure is set true.

SET_INTEGRATION() instructs the robot controller to enable integration servoing in all the joints specified by mask. The exact meaning of this will vary from controller to controller, although in general it is assumed that integration servoing implies the usual advantage of low static error at the cost of less stability. The mask settings may be read back in the integration field of the HOW structure.

SET_CALIBMODE() instructs the robot controller to place the joints indicated by mask into calibration mode. The mask settings may be read back in the calibMode field of the HOW structure.

The meaning of calibration mode will vary from robot to robot. On the PUMA robot, it means that the joint will continue to move in response to motion requests until it encounters an encoder reference mark. At this point, the joint will freeze, and not respond to any further requests until an encoder value has been loaded into it with the SET_ENCODER() command. A bit corresponding to the joint in question will be set in the markFound field of the HOW structure; this bit is automatically cleared when the SET_ENCODER() command is called for that joint.

SET_CALIBFLAG() sets the calibration flag in the robot controller, from which it is read back into the calibrated field of the HOW structure. The purpose of the calibration flag is to indicate whether or not the robot is calibrated. The flag is stored in the robot controller, so as to make it easy to keep the value of the variable in sync with whether the robot really is calibrated: if the controller is powered off, the robot will lose calibration and the variable will be cleared. This macro is used only by calibration software.

Joint mask patterns map joint 1 onto bit 0, joint 2 onto bit 1, etc. Bit settings for non-existent joints are ignored, so the construct (unsigned long)~0 will select all available joints.

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