SimulateAxisAbsolute

Calculates the duration an absolute move takes to complete.

Syntax

KsError SimulateAxisAbsolute(
     int Index,
     double Position,
     double Velocity,
     double Acceleration,
     double Deceleration,
     double Jerk,
     McDirection Direction,
     double* AccelerationTime,
     double* DecelerationTime,
     double* Duration
);

Parameters

Index: the index of an axis. Indexes are zero based. Aliases affect this parameter.

Position: the target position for the motion. [unit] (negative or positive)

Velocity: a value of the maximum velocity. Not necessarily reached if the target position is close. [unit/second]

Acceleration: a value of the acceleration. Always positive. The unit is determined by the McProfileType type. (increasing power of the motor) [unit/second2] or [second]

Deceleration: a value of the deceleration. Always positive. The unit is determined by the McProfileType type. (decreasing power of the motor) [unit/second2] or [second]

Jerk: a value of the jerk. Always positive. The unit is determined by the McProfileType type. [unit/second3] or [second]

Direction: the moving direction of an axis. See the McDirection type.

AccelerationTime: the duration of the move acceleration phase.

DecelerationTime: the duration of the move deceleration phase.

Duration: the duration of the move.

Return value

If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.

Remarks

When modulo axis is enabled, the modulo value will be applied to the Position parameter, and the axis movement is simulated according to the configured Direction.

For example, with a modulo value of 360, when Direction is set to:

Example

N/A

Requirements

  RT Win32
Minimum supported version 4.0 4.0
Header ksmotion.h ksmotion.h
Library KsApi_Rtss.lib KsApi.lib

See also

MoveAxisAbsolute

SimulateAxisRelative