rcclSetInterval(3)

NAME
rcclSetInterval, rcclGetInterval -- routines for manipulating the RCCL sample rate.

USAGE
rcclSetInterval (interval)
  int interval;

rcclGetInterval()

ARGUMENTS

interval --
    Trajectory generator sample interval (milliseconds).

RESTRICTIONS
rcclSetInterval() must be called from the planning level, and it is not permitted to change the sample interval when the system is in operation.

DESCRIPTION
These routines are used to control the rate at which the RCCL trajectory generator runs. For instance, it is sometimes useful to use a longer sample interval to facilitate more complex control level calculations. On the other hand, it may be necessary to use a shorter sample interval for certain types of feedback applications. The default interval is specified by the RCCL parameter interval in the .rciparams file (see RCCL_params(5)).

rcclSetInterval() sets the sample interval. This must be done when the trajectory generator is not running.

rcclGetInterval() returns the current sample interval in milliseconds.

DIAGNOSTICS
rcclSetInterval() 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:

ETaskActive --
    RCCL control level is running.

EInternal --
    Unexpected internal software or communication failure.

rcclGetInterval() returns -1 if no call has yet been made to either rcclCreate() or rcclSetInterval().

rcclSetInterval() will abort the program if called from the control level.

SEE ALSO
rcclCreate(3), rcclStart(3), rciParameters(3), errorStack(3).