Function
Sets deceleration time.
Format
Ret = SmcWSetDecelTime( Id, AxisNo, DecelTime )
Parameters
Id [ C, C++: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved by SmcWInit function.
AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]
Specify axis number.
DecelTime [ C, 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 [ C, C++: long ] [ 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.
C, C++
long Ret;
double DecelTime ;
DecelTime = 90;
Ret = SmcWSetDecelTime( Id , 1, DecelTime );
Python
Ret = ctypes.c_long()
DecelTime = ctypes.c_double()
DecelTime.value = 90
Ret.value = csmc.SmcWSetDecelTime( Id , 1, DecelTime )
See Also