rcclPause(3)

NAME
rcclPause, rcclResume, rcclIsPaused, rcclWasPaused -- pause and resume RCCL motions.

USAGE
rcclPause (atime, ptime)
  float atime, ptime;

rcclResume()

rcclIsPaused()

rcclWasPaused()

ARGUMENTS

ptime --
    Length of time motions are to be paused for (in milliseconds). Specifying this as F_UNDEF causes a pause of indefinite duration.

atime --
    Length of time allocated for slowing motions down and starting them up again. Specifying this as F_DEFAULT causes the default acceleration times to be used.

DESCRIPTION
These routines allow RCCL manipulator motions to be suspended and resumed.

rcclPause() suspends all current RCCL manipulator motions, for ptime milliseconds. If ptime is equal to F_UNDEF, then the motions will pause indefinitely until rcclResume() is called. Other negative values of ptime will cause an error. The deceleration/acceleration times for slowing down the manipulators and starting them up again can be specified with atime. If atime is equal to F_DEFAULT, then the default motion transition times will be used.

rcclResume() causes the RCCL motions to start up again, regardless of whether or not the time limit (if any) specified by ptime has expired. This routine has no effect if the system is not paused.

When the system is paused, the RCCL system time (returned by rcclSysTime()) is frozen. Monitor or transform functions explicitly associated with a motion are also suspended (i.e., those established using runMotionFxn() or transMotionEval()). Other monitor or transform functions will continue to execute (i.e., those established with runMonitorFxn() or transEval()). Care should be taken to implement such functions so that they do not continue to modify manipulator setpoints while the system is paused, since this may cause the robot to jump when resumed. The following predicate functions are intended to help facilitate this:

rcclIsPaused() returns true if the system is currently paused.

rcclWasPaused() returns true if the system was in a paused state during the last control cycle.

DIAGNOSTICS
rcclPause() returns -1 in the event of an error. It will automatically abort the program if the option RCCL_ERROR_EXIT is set (see rcclSetOptions(3)). Error codes and messages are placed on the errorStack (q.v.). The following error codes may be set:

EBusy --
    The system is already paused.

ERange --
    An illegal pause or transition time value was given.

No errors are currently implemented for rcclResume(), rcclIsPaused(), or rcclWasPaused().

SEE ALSO
stopCurrentMotion(3), flushMotions(3), rcclSetOptions(3), errorStack(3).