Function
Retrieves limit status.
Format
Ret = SmcWGetLimitStatus( Id, AxisNo, LimitSts )
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.
LimitSts
[ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short)
]
Specify the address of the variable that stores the limit status.
bit7 [ 0 | 0 | 0 | SD | ORG | -LIM | +LIM | ALM ] bit0
ALM |
Alarm/urgent stop limit |
+LIM |
Positive direction limit |
-LIM |
Negative direction limit |
ORG |
Origin limit |
SD |
Deceleration stop limit |
0 |
Invalid |
1 |
Valid |
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 state of the limit of axis number 1 is acquired.
VB.NET
Dim Ret As Integer
Dim LimitSts As Short
Ret = SmcWGetLimitStatus( Id , 1, LimitSts )
C, C++
long Ret;
short LimitSts;
Ret = SmcWGetLimitStatus( Id , 1, &LimitSts );
C#
int Ret;
short LimitSts;
Ret = Smc.WGetLimitStatus( Id , 1, out LimitSts );
Python
Ret = ctypes.c_long()
LimitSts = ctypes.c_short()
Ret.value = csmc.SmcWGetLimitStatus( Id , 1, ctypes.byref(LimitSts) )