The RMP Motion Controller APIs

◆ MovePT()

void MovePT ( RSIMotionType  type,
const double *const  position,
const double *const  time,
int32_t  pointCount,
int32_t  emptyCount,
bool  retain,
bool  final 
)
Description:
MovePT moves through position/time points.
Parameters
typeRSIMotionTypeBSPLINE, etc. RSIMotionType.
*positionArray of positions (p) to move through. (positions are in the UserUnits for each Axis)
Axis: [p0, p1, p2, ..., pn]
MultiAxis, assuming the Axis mapping is J0, J1, J2: [J0p0, J1p0, J2p0, ..., J0pn, J1pn, J2pn]
*timeArray of time durations for each point in seconds.
Minimum value is your MotionController sample period. Values must be a multiple of the sample period.
If each point should take one millisecond, your array would be: [0.001, 0.001, 0.001, etc.]
pointCountThe number of position/time points.
emptyCountThe minimimum number of position/time points which must be in the RMP firmware before causing an OUT_OF_FRAMES E-Stop action.
The RapidCode library will buffer points to the RMP firmware automatically.
Set this value high enough such that the duration of points are greater than the value of EStopTimeGet/Set().
Using a value of 0 or -1 will result in undefined motion behavior.
retainPoints kept, or not kept (must be True if you attempt a negative feedrate to back up on path).
finalTrue if this is the final streaming motion call, False if more streaming motion calls will occur before this call's points are finishes.
Remarks
This function is also available in RapidSequencer.

Part of the Streaming Motion method group.

Sample Code:
PTmotion
int points = 3; // Specify the total number of streamed points.
int emptyCount = 2; // E-stop generated if there are this number or fewer frames loaded. (Typically for PT motion there are two frames per PT point)
double[] positions = { 1.0, 0.5, 0.75 }; // Specify the positions that you want to reach. (it can be n number)
double[] times = { 0.2, 0.3, 0.1 }; // Specify the times in which you want to reach each position. (velocity and acceleration is calculated by the RMP)
axis.MovePT(RSIMotionType.RSIMotionTypePT, // Specify the type of PT Motion that you want to perform. (RSIMotionType.RSIMotionTypePT, RSIMotionType.RSIMotionTypeBSPLINE, RSIMotionType.RSIMotionTypeBSPLINE2)
positions, // Specify the positions that you want to reach. (it can be n number)
times, // Specify the times in which you want to reach each position. (velocity and acceleration is calculated by the RMP)
points, // Specify the total number of streamed points.
emptyCount, // E-stop generated if there are this number or fewer frames loaded. (Typically for PT motion there are two frames per PT point)
false, // Specify whether points are kept, or are not kept.
true); // Specify if this is the last MovePT. (If True, this is the final point. If False, more points expected.)
axis.MotionDoneWait(); // Wait for motion to be completed.
See also
PVT, DifferentMotionTypes, MoveSCurve, MoveTrapezoidal, MovePVT
Examples
SingleAxisSyncOutputs.cpp, SyncOutputWithMotion.cpp, and UpdateBufferPoints.cpp.
RSI::RapidCode::RSIMotionType
RSIMotionType
Streaming motion types.
Definition: rsienums.h:941