The RMP Motion Controller APIs
MoveSCurve.sq
1void main()
2{
3 // The index of the axis (0 refers to the first axis in the network)
4 uint32 axisIndex = 0;
5
6 // Set the motion parameters
7 double goalPosition = 1.0; // Move 1 unit (revolutions)
8 double velocity = 1000.0; // Move at a velocity of 1 unit per second
9 double acceleration = 10000.0;
10 double deceleration = 10000.0;
11 double jerkPercent = 50.0;
12
14 // Move the axis using the set parameters.
15 AxisMoveSCurve(axisIndex, goalPosition, velocity, acceleration, deceleration, jerkPercent);
17
18 // Wait until the axis is done moving.
19 int32 timeoutMs = 50;
20 int32 elapsedMs = AxisMotionDoneWait(axisIndex, timeoutMs);
21
22 print("Time elapsed (milliseconds): " + elapsedMs);
23 print("Done Moving! Axis is at position: " + AxisCommandPositionGet(axisIndex));
24}