\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{getActiveCount}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{getActiveMotionCounts}},
{\tt \manName{getActiveCount}}
-- get count information for the currently executing RCCL motion.

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

getActiveMotionCounts (mnp, tau, sigma)
  MANIP *mnp;
  int *tau;
  int *sigma;

getActiveCount (mnp)
  MANIP *mnp; @endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt mnp} --}
Manipulator reference structure.
\manItem{{\tt tacc}, {\tt tseg} --}
Return values of the current transition and path segment counts.
These are optional and may be given as {\tt NULL}.
\manSection{DESCRIPTION}
{\tt getActiveMotionCounts()} 
returns the {\it transition count} and {\it path segment count}
in use by the motion currently executing on the manipulator {\tt mnp}.
One ``count'' corresponds to one control cycle, and so the equivalent
time can be determined by multiplying by the control
cycle interval (obtainable with {\tt rcclGetInterval()}).
{\tt tau} is set to the transition count, which is
1/2 the total number of cycles allocated to the smoothing transition
with which the motion began.
{\tt sigma} is set to the {\it path segment count}, which gives
the total number of cycles allocated for the current motion. 
If the motion has no fixed time limit, then {\tt sigma} is set
to {\tt UNDEF}.

{\tt getActiveCount()} returns the {\it count}
associated with the current motion. This is a value which is set to zero 
when the motion segment begins, and is increased by one
every control cycle. 
If there is a transition interval associated with the motion
(i.e., {\tt tau} is not zero), then 
this counting begins ${\tt tau} + 1$ counts {\it before} the
official start time (or transition midpoint). Likewise,
it ends at the beginning of the transition to the next motion.
\manSection{DIAGNOSTICS}
No errors are currently implemented.
\manSection{SEE ALSO}
Information about path segment timing can be obtained from the
support document ``Trajectory Generation in Multi-RCCL'', and
also from the ``Multi-RCCL User's Guide''.

\rightskip=0ptplus1fil
{\tt setTime(3)}, {\tt setSpeed(3)}, {\tt setAccel(3)}.

\manEnd
\end
