Function
Retrieves the setting of stop position (the total number of output pulses) of motor.
Format
Ret = SmcWGetStopPosition( Id, AxisNo, Coordinate, StopPosition )
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 the axis number.
Coordinate
[ VB.NET: Short ] [ C, C++: short ] [ 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
[ VB.NET: Integer ] [ C, C++: long *] [ C#: out int ] [ Python: ctypes.POINTER(ctypes.c_long)
]
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 [ 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
This function can be executed even if the axis 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.
VB.NET
Dim Ret As Integer
Dim Coordinate As Short
Dim StopPosition As Integer
Ret = SmcWGetStopPosition( Id , 1, Coordinate , StopPosition )
C, C++
long Ret;
short Coordinate;
long StopPosition;
Ret = SmcWGetStopPosition( Id , 1, Coordinate , &StopPosition );
C#
int Ret;
short Coordinate;
int StopPosition;
Ret = Smc.WGetStopPosition( Id , 1, Coordinate , out StopPosition );
Python
Ret = ctypes.c_long()
Coordinate = ctypes.c_short()
StopPosition = ctypes.c_long()
Ret.value = csmc.SmcWGetStopPosition( Id , 1, Coordinate , ctypes.byref(StopPosition)
)
See Also