Project

General

Profile

Motion » History » Version 3

Version 2 (Andrej Cimperšek, 05/24/2010 01:19 AM) → Version 3/4 (Andrej Cimperšek, 06/17/2010 01:21 PM)

h1. Motion

!https://redmine.pint.upr.si/attachments/download/337/API_motion.png!

<pre><code class="java">
/**
* Motion API
* @author Andrej Cimperšek
*/
public interface Motion {
/**
* Sets parameters for next motor move
* @param steps
* @param freq
*/
public void SetMove0(int steps, float freq);

/**
* Sets parameters for next motor move
* @param steps
* @param freq
*/
public void SetMove1(int steps, float freq);

/**
* Moves motors according to set moves
*/
public void Run();

/**
* Sets angualr velocity in steps / sec
* @param omega0
*/
public void SetInitialAngularVel0(float omega0);

/**
* Sets angualr velocity in steps / sec
* @param omega0
*/
public void SetInitialAngularVel1(float omega0);

/**
* Sets angualr acceleration in steps / sec^2
* @param accel
*/
public void SetAngularAcceleration0(float accel);

/**
* Sets angualr acceleration in steps / sec^2
* @param accel
*/
public void SetAngularAcceleration1(float accel);

/**
*
* @param steps
*/
public void SetLackCorrection0(short steps);

/**
*
* @param steps
*/
public void SetLackCorrection1(short steps);

/**
* Sets angualr deceleration in steps / sec^2
* @param decel
*/
public void SetAngularDeceleration0(float decel);

/**
* Sets angualr deceleration in steps / sec^2
* @param decel
*/
public void SetAngularDeceleration1(float decel);

/**
* Sets position for stepper 0
* @param position
*/
public void SetPosition0(int position);

/**
* Sets position for stepper 1
* @param position
*/
public void SetPosition1(int position);

/**
* Stops motor 0
*/
public void StopMotor0();

/**
* Stops motor 1
*/
public void StopMotor1();

/**
* Disables current on motor 0
*/
public void MotorOff0();

/**
* Disables current on motor 1
*/
public void MotorOff1();

/**
* Gets positions of both motors
* @return Position
*/
public Position GetPosition();

/**
* Set continuous key movement
*/
public void SetContinuousKeyMovement();

/**
* Set single step key movement
*/
public void SetSingleStepKeyMovement();

/**
* Simulate Left Key Press
*/
public void SimulateLeftKeyPress();

/**
* Simulate Left Key Release
*/
public void SimulateLeftKeyRelease();

/**
* Simulate Right Key Press
*/
public void SimulateRightKeyPress();

/**
* Simulate Right Key Release
*/
public void SimulateRightKeyRelease();

/**
* Simulate Up Key Press
*/
public void SimulateUpKeyPress();

/**
* Simulate Up Key Release
*/
public void SimulateUpKeyRelease();

/**
* Simulate Down Key Press
*/
public void SimulateDownKeyPress();

/**
* Simulate Down Key Release
*/
public void SimulateDownKeyRelease();

/**
* Sets automatic position reporting.
* 0..turns off automatic position reporting, 50..9999 autoreport interval in miliseconds
* @param interval
*/
public void AutomaticPositionReporting(short interval);
//TODO: preglej Motion.cs
}
</code></pre>