SmcWSetDecelTime


Function

Sets deceleration time.

Format

Ret = SmcWSetDecelTime( Id, AxisNo, DecelTime )

Parameters

Id [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
SSpecify the Deice ID retrieved by SmcWInit function.

AxisNo [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify axis number.

DecelTime [ VB.NET: Double ] [ C, C++: double ] [ C#: double ] [ Python: ctypes.c_double ]
Set deceleration time. The unit is [ms].
AccelTime is used as deceleration rate when 0 is specified.
However, in the case of PTP, will not attempt to decel. (Deceleration stop command : Except deceleration SmcWMotionDecStop)
The default becomes valid when -1 is specified.
Valid range: -1, 0, Setting range of deceleration time

The setting range of deceleration time is as follows.
For SMC-2/4/8DL series: 0 to 27303.333333
For SMC-4/8DF series: 0 to 873786.666667

Return Value

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

0

Terminated normally

Non-zero

Terminated abnormally

See also: Error code details

Remarks

The default value is deceleration time: It is 50 ms.

The value is corrected by SmcWSetStartSpeed and SmcWSetTargetSpeed (SmcWSetSSpeed when S Speed operation is used).

For SMC-2/4/8DL series, the conditions under which the maximum deceleration time of 27303.333333 [ms] can be set are as follows.

ResolveSpeed

600

StartSpeed

600

TargetSpeed

9829800

S rate

Not use

Motor operation type

JOG operation

For SMC-4/8DF series, the conditions under which the maximum deceleration time of 873786.666667 [ms] can be set are as follows.

ResolveSpeed

100

StartSpeed

100

TargetSpeed

6553500

S rate

Not use

Motor operation type

JOG operation

If the default value is in use, the function need not be performed.

Example

The deceleration time of axis number 1 is set.
The deceleration time is set to 90msec.

VB.NET
Dim Ret As Integer
Dim DecelTime As Double
DecelTime = 90
Ret = SmcWSetDecelTime( Id , 1, DecelTime )

C, C++
long Ret;
double DecelTime;
DecelTime = 90;
Ret = SmcWSetDecelTime( Id , 1, DecelTime );

C#
int Ret;
double DecelTime;
DecelTime = 90;
Ret = Smc.WSetDecelTime( Id , 1, DecelTime );

Python
Ret = ctypes.c_long()
DecelTime = ctypes.c_double()
DecelTime.value = 90
Ret.value = csmc.SmcWSetDecelTime( Id , 1, DecelTime )

See Also

SmcWGetDecelTime