Learn how to modify motion in-flight in C#.
- 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.
In this page:
📜 Feed Rate
Learn how to use Feed Rate 📖 to adjust motion speed in-flight. Shows how to increase speed, stop, reverse motion, and resume without changing controller state.
Console.WriteLine($"\tPosition commanded: {POSITION}");
Thread.Sleep(10);
Console.WriteLine($"\tPosition after FeedRate (1.5): {axis.CommandPositionGet()}");
Thread.Sleep(500);
Console.WriteLine($"\tPosition after FeedRate (-1): {axis.CommandPositionGet()}");
Console.WriteLine($"\tPosition after FeedRate (1): {axis.CommandPositionGet()} (expected: {POSITION})");
Source: axis-motion-modify.cs
📜 Change Motion Speed
Learn how to change the velocity parameter of a motion that is partially complete. Demonstrates issuing a new move command mid-motion to change speed on the fly.
axis.
MoveSCurve(POSITION, VELOCITY, ACCELERATION, DECELERATION, JERK_PERCENT);
Thread.Sleep(10);
axis.
MoveSCurve(POSITION, VELOCITY * 10, ACCELERATION, DECELERATION, JERK_PERCENT);
Source: axis-motion-modify.cs