using RSI.RapidCode.dotNET;         
using NUnit.Framework;
 
[TestFixture]
[Category("Software")]
public class Motion : SampleAppTestBase
  {
    [Test, Timeout(Constants.MAX_TEST_TIME)]
    public void AbsoluteMotion()
    {
      axis.
MoveTrapezoidal(Constants.POSITION, Constants.VELOCITY, Constants.ACCELERATION, Constants.DECELERATION);
 
      
      Assert.That(axis.
CommandPositionGet(), Is.EqualTo(Constants.POSITION), 
"The command position should be equal to POSITION");
 
    }
 
    [Test, Timeout(Constants.MAX_TEST_TIME)]
    public void SCurveMotion()
    {
      
      Assert.That(axis.
CommandPositionGet(), Is.EqualTo(Constants.POSITION), 
"The command position should be equal to POSITION");
 
    }
 
    [Test, Timeout(Constants.MAX_TEST_TIME)]
    public void FinalVelocity()
    {
      int finalVelocity = 5;
 
                      Constants.VELOCITY,
                      Constants.ACCELERATION,
                      Constants.DECELERATION,
                      Constants.JERK_PERCENT,
                      finalVelocity);         
 
      {
        Assert.That(axis.
CommandVelocityGet(), Is.EqualTo(finalVelocity), 
"The command velocity should be equal to FINAL_VELOCITY");
 
        TearDown();
 
      }
    }
 
    [Test, Timeout(Constants.MAX_TEST_TIME)]
    public void RelativeMotion()
    {
      axis.
MoveRelative(Constants.POSITION, Constants.VELOCITY, Constants.ACCELERATION, Constants.DECELERATION, Constants.JERK_PERCENT);  
 
 
 
      
      axis.
MoveRelative(-1 * Constants.POSITION, Constants.VELOCITY, Constants.ACCELERATION, Constants.DECELERATION, Constants.JERK_PERCENT);
 
      
      Assert.That(cmdPositionAfterMove, Is.EqualTo(Constants.POSITION), "The command position should be equal to POSITION");
    }
 
    [Test]
    public void MoveVelocity()
    {
      
      axis.
MoveVelocity(Constants.VELOCITY, Constants.ACCELERATION); 
 
 
      {
        Assert.That(axis.
CommandVelocityGet(), Is.EqualTo(Constants.VELOCITY), 
"The command velocity should be equal to FINAL_VELOCITY");
 
        TearDown();
      }
    }
  }
double CommandPositionGet()
Get the current command position.
 
void MoveVelocity(double velocity)
 
void MoveTrapezoidal(double position, double vel, double accel, double decel)
Point-to-point trapezoidal move.
 
double CommandVelocityGet()
Get the current commanded velocity.
 
void MoveRelative(double relativePosition, double vel, double accel, double decel, double jerkPct)
Command a relative point-to-point S-Curve motion.
 
void MoveSCurve(double position, double vel, double accel, double decel, double jerkPct)
 
int32_t MotionDoneWait()
Waits for a move to complete.