SmcWSetAccelTime


Function

Sets acceleration time.

Format

Ret = SmcWSetAccelTime( Id, AxisNo, AccelTime )

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.

AccelTime [ VB.NET: Double ] [ C, C++: double ] [ C#: double ] [ Python: ctypes.c_double ]
Set acceleration time. The unit is [ms].
It is set to target speed instantly without accelerating when 0 is specified.
The default value becomes valid when -1 is specified.
Valid range: -1, 0, Setting range of acceleration time

The setting range of acceleration 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 acceleration time: It is 50 ms.

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

For SMC-2/4/8DL series, the conditions under which the maximum acceleration 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 acceleration 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 acceleration time of axis number 1 is set.
The acceleration time is set to 45msec.

VB.NET
Dim Ret As Integer
Dim AccelTime As Double
AccelTime = 45
Ret = SmcWSetAccelTime( Id , 1, AccelTime )

C, C++
long Ret;
double AccelTime;
AccelTime = 45;
Ret = SmcWSetAccelTime( Id , 1, AccelTime );

C#
int Ret;
double AccelTime;
AccelTime = 45;
Ret = Smc.WSetAccelTime( Id , 1, AccelTime );

Python
Ret = ctypes.c_long()
AccelTime = ctypes.c_double()
AccelTime.value = 45
Ret.value = csmc.SmcWSetAccelTime( Id , 1, AccelTime )

See Also

SmcWGetAccelTime