APIs, concepts, guides, and more

◆ MovePTF()

void MovePTF ( const double *const position,
const double *const time,
const double *const feedforward,
int32_t pointCount,
int32_t emptyCount,
bool retain,
bool final )
Description:
MovePTF moves through position/time points with feedforward values. See Streaming Motion and PT Streaming Motion for more information. The feedforward values are applied directly to the control output.
Parameters
*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.]
*feedforwardArray of feedforward values (f) to apply. (commonly scaled to 16-bit or 32-bit integer values)
Axis: [f0, f1, f2, ..., fn]
MultiAxis, assuming the Axis mapping is J0, J1, J2: [J0f0, J1f0, J2f0, ..., J0fn, J1fn, J2fn]
pointCountThe number of position/time/feedforward 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 finished.
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.

Part of the Streaming Motion method group.

Performance
When starting from RSIStateIDLE, MovePT and MovePVT will internally call InterruptEnableSet().
Use MotionAttributeMaskOnSet() with RSIMotionAttrMask::RSIMotionAttrMaskNO_INTERRUPT_ENABLE to disable this behavior, which reduces the time it takes to start the motion.
Be sure to call InterruptEnableSet() once during initialization.

See also
Streaming Motion, PT Streaming Motion, MovePT, MovePVTF