APIs, concepts, guides, and more
PVAJT Streaming Motion

Stream arrays for precise control over Positions, Velocities, Acceleration, Jerk, and Time deltas directly to the frame buffer. Achieve absolute control over the motion path.

🔹 What is PVAJT Motion

PVAJT motion is a lot more complicated to use because it requires an array of Positions, Velocities, Acceleration, Jerk, and Time deltas. The controller is not responsible for any calculations because it streams the arrays straight to the frame buffer. This makes it very flexible and gives users absolute control over the motion path. The controller does not do any interpolation or calculations because everything it needs is calculated beforehand in the PVAJT arrays. PVAJT motion must all be provided in advance and cannot be appended to.

The effect of velocity, acceleration, and jerk depends on the time between points. Larger time deltas increase the influence of the higher-order terms, while at the opposite extreme (using 1-sample time deltas) the motion is equivalent to PT.

Move PVAJT Output Example

PVAJT is useful if you must control the acceleration and jerk percent profile throughout motion.

The example to the right shows a 50% jerk SCurve trapezoidal move. This move requires 7 elements in each array. One segment for each rising/constant/falling segment of the acceleration profile.

The math for PVAJT can be very cumbersome. We recommend you explore all other motion types before trying to implement this method.

Note: The Position, Velocity, Acceleration, and Jerk arrays are all direction sensitive meaning you must put a (-) sign on negative numbers.

Image

📜 Sample Code

  • C#

    /* 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);
    // configure phantom 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
    }
    // handle errors as needed
    finally
    {
    controller.Delete(); // dispose
    }
    static void AbortMotionObject(RapidCodeMotion motionObject)
    Aborts motion on the given RapidCodeMotion object (Axis or MultiAxis), waits for motion to stop,...
    Definition _helpers.cs:186
    static void CheckErrors(RapidCodeObject rsiObject)
    Checks for errors in the given RapidCodeObject and throws an exception if any non-warning errors are ...
    Definition _helpers.cs:15
    static void PhantomAxisReset(Axis phantomAxis)
    Configures a phantom axis on the controller.
    Definition _helpers.cs:144
    Helpers class provides static methods for common tasks in RMP applications.
    Definition _helpers.cs:5
    Represents a single axis of motion control. This class provides an interface for commanding motion,...
    Definition rsi.h:5862
    Axis * AxisGet(int32_t axisNumber)
    AxisGet returns a pointer to an Axis object and initializes its internals.
    static MotionController * Get()
    Get an already running RMP EtherCAT controller.
    void Delete(void)
    Delete the MotionController and all its objects.
    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)