Function
Changes the speed in the motor operation, and the stop position change is set.
Format
Ret = SmcWSetMotionChangeReady( Id , AxisNo , ChangeType )
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.
ChangeType [ C, C++: short ] [ Python: ctypes.c_short ]
Set motor motion type.
0 |
It changes instantaneously to the beginning speed (FL speed). |
1 |
It changes instantaneously to the speed of the target (FH speed). |
2 |
It decelerates and it changes to the beginning speed (FL speed). |
3 |
It accelerates and it changes to the speed of the target (FH speed). |
4 |
Operation speed, acceleration and deceleration time are changed. |
5 |
Motor stop position change(target positional override 1) |
6 |
Positional motor stop kooky setting according to PCS signal(target positional override 2) |
7 |
Acceleration and deceleration is not changed, only operation speed is changed. |
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Initial Value
0 : It changes instantaneously to the beginning speed (FL speed).
Remarks
It can not be executed while motor is already stopped.
The speed of the final deceleration of the axis cannot change.
The stop position change is possible only that PTP operates.
Please do not execute a set function of the basic operation parameter (SmcWSetTargetSpeed etc.) until the SmcWMotionChange function is executed after this function is executed. It is likely not to operate normally.
When ChangeType=0-4,7 is
set
If a change of operation is made by this setup during PTP operation, in
many cases, the final deceleration cannot be performed normally.
This is because outputting the specified number of pulses is the top priority
in PTP operation.
Therefore, when making a change of operation by this setup during PTP operation,
it is necessary to mind above.
When ChangeType=6 is set
PCS input agency commands (Equal to PCS input signal ON process it) occur
by the SmcWMotionChange function execution.
Moreover, it is necessary to turn on bit 5(PCS) of CtrlIn of the SmcWSetCtrlTypeIn
function.
When the stop position is changed by external PCS input, this function
and the SmcWMotionChange function need
not be executed.
If bit 5(PCS) of CtrlIn
of the SmcWSetCtrlTypeIn
function has been turned on, PCS signal is changed to be the input waiting
state.
Until PCS signal is input (or, until PCS input agency commands occur),
motion is changed to be JOG operation unconditionally.
Operating from the timing of the PCS signal is input to the position of
specified pulses.
When ChangeType=7 is set
Calculate the acceleration and deceleration (gradient) by the specified
Start Speed, Target Speed, acceleration and deceleration time, then motion
starts.
Execute function SmcWMotionChange, the
rate is not changed, only speed is changed. The rate can not be changed.
When doing the deceleration stop by function SmcWMotionStop, motion stops
by deceleration during the specified Decel Time.
But in the case of PTP operation, because of the restriction mentioned
above, the motion maybe cannot stop by deceleration during the specified
Decel Time.
Example
The operation change type of axis number 1 is set to "Change instantaneously to the beginning speed".
C, C++
long Ret;
Ret = SmcWSetMotionChangeReady( Id , 1, 0 );
Python
Ret = ctypes.c_long()
Ret.value = csmc.SmcWSetMotionChangeReady( Id , 1, 0 )
See Also