Click or drag to resize

CalculatorCalculateTime Method

Calculates the time at which the specified (signed) target position will be hit.

Namespace:  Demo3D.Visuals.Motor
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 15.0.2.11458
Syntax
C#
public static double CalculateTime(
	 in State initial,
	double sd,
	double vd,
	double amax,
	double dmax,
	double smin,
	double smax
)

Parameters

initial
Type: Demo3D.Visuals.MotorState

[Missing <param name="initial"/> documentation for "M:Demo3D.Visuals.Motor.Calculator.CalculateTime(Demo3D.Visuals.Motor.State@,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double)"]

sd
Type: SystemDouble

[Missing <param name="sd"/> documentation for "M:Demo3D.Visuals.Motor.Calculator.CalculateTime(Demo3D.Visuals.Motor.State@,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double)"]

vd
Type: SystemDouble

[Missing <param name="vd"/> documentation for "M:Demo3D.Visuals.Motor.Calculator.CalculateTime(Demo3D.Visuals.Motor.State@,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double)"]

amax
Type: SystemDouble

[Missing <param name="amax"/> documentation for "M:Demo3D.Visuals.Motor.Calculator.CalculateTime(Demo3D.Visuals.Motor.State@,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double)"]

dmax
Type: SystemDouble

[Missing <param name="dmax"/> documentation for "M:Demo3D.Visuals.Motor.Calculator.CalculateTime(Demo3D.Visuals.Motor.State@,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double)"]

smin
Type: SystemDouble

[Missing <param name="smin"/> documentation for "M:Demo3D.Visuals.Motor.Calculator.CalculateTime(Demo3D.Visuals.Motor.State@,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double)"]

smax
Type: SystemDouble

[Missing <param name="smax"/> documentation for "M:Demo3D.Visuals.Motor.Calculator.CalculateTime(Demo3D.Visuals.Motor.State@,System.Double,System.Double,System.Double,System.Double,System.Double,System.Double)"]

Return Value

Type: Double
The time at which the target position is hit.
Remarks
This function will determine the shortest time and doesn't require motion to come to a stop at the target position. In the case that the target position cannot be achieved then a negative time will be returned. This function makes the following assumptions, which the parameters must satisfy: 1. The initial time is positive (>= 0). 3. The maximum acceleration amax is finite and positive (>= 0). 4. The maximum deceleration dmax is finite and positive (>= 0). 5. The maxumum position limit is greater than or equal to the minimum position limit. Failure to satisfy the assumptions will likely result in garbage being returned.
See Also