Example) Change the speed of X (axis number 1) that is performing JOG operation.
Change the speed to 2,000[PPS] with an acceleration time of 10[msec].
■ C
long Ret;
short Id;
// Set the speed after change
Ret = SmcWSetTargetSpeed( Id, 1, 2000);
// Set the acceleration time after change (10msec)
Ret = SmcWSetAccelTime( Id, 1, 10);
// Register the changes (changes in operating speed and acceleration/deceleration time).
Ret = SmcWSetMotionChangeReady( Id, 1, 4);
// Change the motor speed.
Ret = SmcWMotionChange( Id, 1);
■ Visual Basic
Dim Ret As Integer
Dim Id As Short
' Set the speed after change
SmcWSetTargetSpeed( Id, 1, 2000#)
' Set the acceleration time after change (10msec)
Ret = SmcWSetAccelTime( Id, 1, 0)
' Register the changes (changes in operating speed and acceleration/deceleration time).
Ret = SmcWSetMotionChangeReady( Id, 1, 4);
' Change the motor speed.
Ret = SmcWMotionChange( Id, 1)
■ C#
int Ret;
short Id;
// Set the speed after change
Ret = Smc.WSetTargetSpeed( Id, 1, 2000);
// Set the acceleration time after change (10msec)
Ret = Smc.WSetAccelTime( Id, 1, 10);
// Register the changes (changes in operating speed and acceleration/deceleration time).
Ret = Smc.WSetMotionChangeReady( Id, 1, 4);
// Change the motor speed.
Ret = Smc.WMotionChange( Id, 1);
■ Python
Ret = ctypes.c_long()
Id = ctypes.c_short()
# Set the speed after change
Ret.value = csmc.SmcWSetTargetSpeed( Id, 1, 2000)
# Set the acceleration time after change (10msec)
Ret.value = csmc.SmcWSetAccelTime( Id, 1, 10)
# Register the changes (changes in operating speed and acceleration/deceleration time).
Ret.value = csmc.SmcWSetMotionChangeReady( Id, 1, 4)
# Change the motor speed.
Ret.value = csmc.SmcWMotionChange( Id, 1)