Moves axis relative distance from the current position

Namespace: EAL.Interfaces.Motion
Assembly: EAL (in EAL.dll) Version: 1.1.5.0 (1.1.5.0)

Syntax

C#
void MoveRelative(
	double distance,
	double velocity,
	double acceleration,
	double deceleration,
	double jerk
)
Visual Basic
Sub MoveRelative ( 
	distance As Double,
	velocity As Double,
	acceleration As Double,
	deceleration As Double,
	jerk As Double
)
Visual C++
void MoveRelative(
	double distance, 
	double velocity, 
	double acceleration, 
	double deceleration, 
	double jerk
)

Parameters

distance
Type: System..::..Double
Relative distance
velocity
Type: System..::..Double
Velocity to be taken to reach the new target
acceleration
Type: System..::..Double
Acceleration to be taken to reach the given velocity
deceleration
Type: System..::..Double
Deceleration to be taken to reach zero velocity
jerk
Type: System..::..Double
Jerk to be taken to reach the given acceleration

Examples

Synchronous method
 Copy imageCopy
private static void Sample()
{
    using (IEALConnection ealConnection = new EALConnection())
    {
        ealConnection.Connect("192.168.0.10", false, 10000, 2000, 500);                        // Eatablishes connection
        // Gets axis
        IAxis axis = ealConnection.Motion.Axes[0]; 
        axis.Movement.Power(false);                            // Powers-off
        axis.SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE_PARAMETERIZATION);   // Activates parameterisation mode 
        ealConnection.Initialize();                                     // Initializes the axis
        axis.SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE);      // Activates operating mode
        axis.Movement.Power(true);                             // Powers on 
        axis.Movement.Home();                                  // Executes Homing 
        axis.Movement.MoveAbsolute(0, 400, 100, 100, 0);       // Moves the axis to position 10000 
        axis.Movement.Wait(10000);                             // Waits task until last movement command completes
        axis.Movement.MoveAbsolute(10000, 400, 100, 100, 0);   // Moves the axis to position 10000 
        axis.Movement.Wait(20000);                             // Waits task until last movement command completes
        axis.Movement.MoveRelative(2000, 100, 100, 100, 0);    // Moves another 2000 degrees after last movement command completes 
        axis.Movement.Wait(20000);                             // Waits until last movement command completes              
        double actualPosition = axis.GetActualPosition();      // actualPosition will be 12000
    }
}
Asynchronous method
 Copy imageCopy
private static void Sample()
{
    using (IEALConnection ealConnection = new EALConnection(true))  // Asynchronous flag is true
    {
        ealConnection.Connect("192.168.0.10", false, 10000, 2000, 500);                        // Eatablishes connection task will be added to the queue
        // Gets axis
        IAxis axis = ealConnection.Motion.Axes[0]; 
        axis.Movement.Power(false);                            // Powers-off task will be added to the queue
        axis.SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE_PARAMETERIZATION);   // Activate parameterisation mode will be added to queue
        ealConnection.Initialize();                                     // Initializes the axis
        axis.SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE);                    // Activate Operating mode will be added to queue
        axis.Movement.Power(true);                             // Powers on task will be added to queue.
        axis.Movement.Home();                                  // Homing task will be added to queue.
        axis.Movement.MoveAbsolute(0, 400, 100, 100, 0);       // Moves the axis to position 10000 
        axis.Movement.Wait(10000);                             // Waits task until last movement command completes will be added to queue
        axis.Movement.MoveAbsolute(10000, 400, 100, 100, 0);   // Moves the axis to position 10000 
                                                                // task will be added to queue.
        axis.Movement.Wait(20000);                             // Waits task until last movement command completes will be added to queue
        axis.Movement.MoveRelative(2000, 100, 100, 100, 0);    // Moves another 2000 degrees task after last movement command completes will be added to queue                                               
        axis.Movement.Wait(20000);                             // Waits task until last movement command completes will be added to queue
        ealConnection.WaitUntilQueueComplete();                         // Now it will wait untill all are executed.        
        double actualPosition = axis.GetActualPosition();      // actualPosition will be 12000
    }
}

See Also