48using RSI.RapidCode.dotNET;
60public class motionStreaming : SampleAppTestBase
63 public void PTmotion()
69 double[] positions = { 1.0, 0.5, 0.75 };
70 double[] times = { 0.2, 0.3, 0.1 };
85 Assert.That(axis.
CommandPositionGet(), Is.EqualTo(positions.Last()),
"The command position should be equal to last position in the array");
88 [Test, Timeout(Constants.MAX_TEST_TIME)]
89 public void PVTmotion()
95 double[] positions = { 1.0, 0.5, 0.75 };
96 double[] velocities = { 12.0, 10.0, 6.0 };
97 double[] times = { 0.1, 0.2, 0.1 };
111 Assert.That(axis.
CommandPositionGet(), Is.EqualTo(positions.Last()),
"The command position should be equal to last position in the array");
114 [Test, Timeout(Constants.MAX_TEST_TIME)]
115 public void PVAJTmotion()
121 double[] positions = { 1.0, 0.5, 0.75 };
122 double[] velocities = { 10.0, 20.0, 40.0 };
123 double[] accelerations = { 4, 4, 4 };
124 double[] jerks = { 50, 50, 50 };
125 double[] times = { 0.4, 0.2, 0.1 };
141 Assert.That(axis.
CommandPositionGet(), Is.EqualTo(positions.Last()),
"The command position should be equal to last position in the array");
144 [Test, Timeout(Constants.MAX_TEST_TIME)]
145 public void PTmotionWhileStopping()
148 const int points = 3;
149 const int emptyCount = 2;
151 double[] first = { 0.1, 0.2, 0.3 };
152 double[] second = { 0.4, 0.5, 0.6 };
153 double[] third = { 0.7, 0.8, 0.9 };
155 double[] time1 = { 0.3, 0.3, 0.3 };
156 double[] time2 = { 0.2, 0.2, 0.2 };
157 double[] time3 = { 0.25, 0.25, 0.25 };
159 axis.
MovePT(
RSIMotionType.RSIMotionTypePT, first, time1, points, emptyCount,
false,
false);
160 axis.
MovePT(
RSIMotionType.RSIMotionTypePT, second, time2, points, emptyCount,
false,
false);
double CommandPositionGet()
Get the current command position.
int32_t MotionDoneWait()
Waits for a move to complete.
void Resume()
Resume an axis.
void MovePVT(const double *const position, const double *const velocity, const double *const time, int32_t pointCount, int32_t emptyCount, bool retain, bool final)
Move commanded by list of positions, velocities, and times.
void MovePT(RSIMotionType type, const double *const position, const double *const time, int32_t pointCount, int32_t emptyCount, bool retain, bool final)
A move commanded by a list of position and time points.
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)
RSIMotionType
Streaming motion types.