APIs, concepts, guides, and more

◆ 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. See Streaming Motion and PVAJT Streaming Motion for more information.

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
MovePVAJT supports preloaded motion, not continuous streaming motion. See RSIMotionType.
Note
Non-Blocking Execution Motion commands return instantly and do not pause code execution. Use MotionDoneWait() post-call to block execution until motion completes, or MotionDoneGet() to poll for completion.
Sample Code:
📜 Streaming Motion: PVAJT
/* Demonstrates PVAJT (Position-Velocity-Acceleration-Jerk-Time) streaming motion.
PVAJT motion requires position, velocity, acceleration, jerk, and time arrays.
The controller uses all specified motion parameters for each segment.
*/
using RSI.RapidCode; // RSI.RapidCode.dotNET;
Console.WriteLine("📜 Axis Streaming Motion: PVAJT");
// get rmp objects
try
{
Helpers.CheckErrors(controller);
// get axis
Axis axis = controller.AxisGet(Constants.AXIS_0_INDEX);
Helpers.CheckErrors(axis);
// configure phantom axis
Helpers.PhantomAxisReset(axis);
int points = 3; // total number of streamed points
int emptyCount = 2; // e-stop generated if there are this number or fewer frames loaded
double[] positions = [1.0, 0.5, 0.75]; // positions to reach
double[] velocities = [10.0, 20.0, 40.0]; // velocities for each position
double[] accelerations = [4, 4, 4]; // accelerations for each move
double[] jerks = [50, 50, 50]; // jerks for each move
double[] times = [0.4, 0.2, 0.1]; // time deltas for each position
axis.AmpEnableSet(true);
axis.MovePVAJT(positions, // positions to reach
velocities, // velocities for each position
accelerations, // accelerations for each move
jerks, // jerks for each move
times, // time deltas
points, // total number of points
emptyCount, // minimum frames before e-stop
false, // whether points are kept
true); // if this is the last MovePVAJT call (true = final point, false = more points expected)
// wait for motion to complete
Console.WriteLine($"Final position: {axis.CommandPositionGet()}");
// cleanup
Helpers.AbortMotionObject(axis);
}
// handle errors as needed
finally
{
controller.Delete(); // dispose
}
Constants used in the C# sample apps.
Definition _constants.cs:3
const int AXIS_0_INDEX
Default: 0.
Definition _constants.cs:11
Represents a single axis of motion control. This class provides an interface for commanding motion,...
Definition rsi.h:5863
static MotionController * Get()
Get an already running RMP EtherCAT controller.
Represents the RMP soft motion controller. This class provides an interface to general controller con...
Definition rsi.h:800
int32_t MotionDoneWait()
Waits for a move to complete.
int32_t AmpEnableSet(bool enable, int32_t ampActiveTimeoutMilliseconds=AmpEnableTimeoutMillisecondsDefault, bool overrideRestrictedState=false)
Enable all amplifiers.
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)
Helpers namespace provides utility functions for common tasks in RMP applications.
Definition helpers.h:21
See also
MovePT, MovePVT, Streaming Motion and PVAJT Streaming Motion
Examples
axis-motion-streaming-pvajt.cs.