Learn how to configure use the MoveSCurve function in RapidScript.
- Warning
- This is a sample program to assist in the integration of the RMP motion controller with your application. It may not contain all of the logic and safety features that your application requires. We recommend that you wire an external hardware emergency stop (e-stop) button for safety when using our code sample apps. Doing so will help ensure the safety of you and those around you and will prevent potential injury or damage.
The sample apps assume that the system (network, axes, I/O) are configured prior to running the code featured in the sample app. See the Configuration page for more information.
- Precondition
- This sample application requires at least one axis (can be a phantom)
📜 MoveSCurve Sample App
A sample application that:
1. Configures the axis.
2. Prepares the axis for motion.
3. Performs an SCurve move and waits for it to complete.
4. Prints the final position of the axis.
7 double goalPosition = 1.0;
8 double velocity = 1000.0;
9 double acceleration = 10000.0;
10 double deceleration = 10000.0;
11 double jerkPercent = 50.0;
15 AxisMoveSCurve(axisIndex, goalPosition, velocity, acceleration, deceleration, jerkPercent);
20 int32 elapsedMs = AxisMotionDoneWait(axisIndex, timeoutMs);
22 print(
"Time elapsed (milliseconds): " + elapsedMs);
23 print(
"Done Moving! Axis is at position: " + AxisCommandPositionGet(axisIndex));
Learn more in topic page.