The RMP Motion Controller APIs

◆ MovePVAJT()

void MovePVAJT ( const double *const position,
const double *const velocity,
const double *const acceleration,
const double *const jerk,
const double *const time,
int32_t pointCount,
int32_t emptyCount,
bool retain,
bool final )

Part of the Streaming Motion method group. Move using positions, velocities, accelerations, jerks and times.

Parameters
*positionArray of positions (p) to move through. (positions are in the UserUnits for each Axis)
*velocityArray of velocities (v). (velocities are in UserUnits/second for each Axis)
*accelerationArray of accelerations (a). (accelerations are in UserUnits/second2 for each Axis)
*jerkArray of jerks (j). (jerks are in UserUnits/second3 for each Axis)
*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 number of motion frames (2 per point) that must be in the RMP firmware's buffer, below which triggers an OUT_OF_FRAMES E-Stop action.
The RapidCode library will load frames to the RMP firmware automatically, when the buffer gets low (1/4 of the MotionController::AxisFrameBufferSizeSet() value).
Set emptyCount high enough such that the duration of frames (2 per point) are greater than the value of EStopTimeGet/Set().
emptyCount must also be smaller than 20% of the MotionController::AxisFrameBufferSizeSet() value.
Using a value of 0 or -1 will result in undefined motion behavior if the firmware frame buffer is starved.
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.
Note
Non-Blocking Execution Motion commands return instantly and do not pause code execution. Use MotionDoneWait() post-call to halt execution until motion completes.
Sample Code:
PVAJTmotion
int points = 3; // Specify the total number of streamed points. (Very Important!)
int emptyCount = 2; // E-stop generated if there aren't at least this many points loaded.
double[] positions = { 1.0, 0.5, 0.75 }; // Specify the positions that you want to reach. (it can be n number)
double[] velocities = { 10.0, 20.0, 40.0 }; // Specify the velocities that you want to use to reach your position.
double[] accelerations = { 4, 4, 4 }; // Specify the accelerations that you want to use to reach your position.
double[] jerks = { 50, 50, 50 }; // Specify the jerks that you want to use in each move.
double[] times = { 0.4, 0.2, 0.1 }; // Specify the times in which you want to reach each position.
axis.MovePVAJT(positions, // Specify the positions that you want to reach. (it can be n number)
velocities, // Specify the velocities that you want to reach. (it can be n number)
accelerations, // Specify the accelerations that you want to use during every move.
jerks, // Specify the jerks that you want to use during every move.
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 PVAJT motion there are two frames per PVAJT point)
false, // Specify whether points are kept, or are not kept.
true); // Specify if this is the last MovePVAJT. (If True, this is the final point. If False, more points expected.)
axis.MotionDoneWait(); // Wait for motion to be completed.
See also
MovePT, MovePVT
Examples
MotionStreaming.cs.