Function
Retrieves the setting of stop position (the total number of output pulses) of motor.
Format
Ret = SmcWGetStopPosition( Id, AxisNo, Coordinate, StopPosition )
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 the axis number.
Coordinate [ C, C++: short ] [ Python: ctypes.c_short ]
Specify the address of a
variable to store the value of position coordinate.
0: Absolute coordinate
1: Relative coordinate
StopPosition [ C, C++: int *] [ Python: ctypes.POINTER(ctypes.c_int) ]
Specify the address of a variable to store the value of stop position.
Absolute coordinate: -134,217,728
to +134,217,727
Relative coordinate: -134,217,728 to +134,217,727 (except for 0)
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Remarks
This function can be executed even if the device is in operation.
Example
The set up information at the position (number of total output pulses) where the motor of axis number 1 is stopped is acquired.
C, C++
long Ret;
short Coordinate ;
int StopPosition ;
Ret = SmcWGetStopPosition( Id , 1, Coordinate , &StopPosition ) ;
Python
Ret = ctypes.c_long()
Coordinate = ctypes.c_short()
StopPosition = ctypes.c_int()
Ret.value = csmc.SmcWGetStopPosition( Id , 1, Coordinate , ctypes.byref(StopPosition) )
See Also