54using RSI.RapidCode.dotNET;
66public class motionStreaming : SampleAppTestBase
69 public void PTmotion()
75 double[] positions = { 1.0, 0.5, 0.75 };
76 double[] times = { 0.2, 0.3, 0.1 };
91 Assert.That(axis.
CommandPositionGet(), Is.EqualTo(positions.Last()),
"The command position should be equal to last position in the array");
94 [Test, Timeout(Constants.MAX_TEST_TIME)]
95 public void PVTmotion()
101 double[] positions = { 1.0, 0.5, 0.75 };
102 double[] velocities = { 12.0, 10.0, 6.0 };
103 double[] times = { 0.1, 0.2, 0.1 };
117 Assert.That(axis.
CommandPositionGet(), Is.EqualTo(positions.Last()),
"The command position should be equal to last position in the array");
120 [Test, Timeout(Constants.MAX_TEST_TIME)]
121 public void PVAJTmotion()
127 double[] positions = { 1.0, 0.5, 0.75 };
128 double[] velocities = { 10.0, 20.0, 40.0 };
129 double[] accelerations = { 4, 4, 4 };
130 double[] jerks = { 50, 50, 50 };
131 double[] times = { 0.4, 0.2, 0.1 };
147 Assert.That(axis.
CommandPositionGet(), Is.EqualTo(positions.Last()),
"The command position should be equal to last position in the array");
150 [Test, Timeout(Constants.MAX_TEST_TIME)]
151 public void PTmotionWhileStopping()
154 const int points = 3;
155 const int emptyCount = 2;
157 double[] first = { 0.1, 0.2, 0.3 };
158 double[] second = { 0.4, 0.5, 0.6 };
159 double[] third = { 0.7, 0.8, 0.9 };
161 double[] time1 = { 0.3, 0.3, 0.3 };
162 double[] time2 = { 0.2, 0.2, 0.2 };
163 double[] time3 = { 0.25, 0.25, 0.25 };
165 axis.
MovePT(
RSIMotionType.RSIMotionTypePT, first, time1, points, emptyCount,
false,
false);
166 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
PT and PVT streaming motion types.