Function
Retrieves the settings of behavior of the soft limit.
Format
Ret = SmcWGetSoftLimit( Id, AxisNo, PLimMode, MLimMode, PLimCount, MLimCount )
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.
PLimMode [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of the variable that stores the valid/invalid the soft limit of the [+] Side.
0 |
Invalidate the [+] Side soft limit |
1 |
Validate the [+] Side soft limit |
MLimMode [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of the variable that stores the valid/invalid the soft limit of the [-] Side.
0 |
Invalidate the [-] Side soft limit |
1 |
Validate the [-] Side soft limit |
PLimCount [ C, C++: int * ] [ Python: ctypes.POINTER(ctypes.c_int) ]
Specify the address of the
variable that stores the value of [+] Side soft limit.
Range : -134217728 to 134217727
MLimCount [ C, C++: int * ] [ Python: ctypes.POINTER(ctypes.c_int) ]
Specify the address of the
variable that stores the value of [-] Side soft limit.
Range : -134217728 to 134217727
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Initial Value
PLimMode |
0 : Invalidate the [+] Side soft limit |
MLimMode |
0 : Invalidate the [-] Side soft limit |
PLimCount |
1000[p] |
MLimCount |
0[p] |
Remarks
This function can be executed even if the device is in operation.
Example
The set up information of the soft limit of axis number 1 is acquired.
C, C++
long Ret;
short PLimMode;
short MLimMode;
int PLimCount ;
int MLimCount;
Ret = SmcWGetSoftLimit( Id , 1, &PLimMode , &MLimMode , &PLimCount , &MLimCount );
Python
Ret = ctypes.c_long()
PLimMode = ctypes.c_short()
MLimMode = ctypes.c_short()
PLimCount = ctypes.c_int()
MLimCount = ctypes.c_int()
Ret.value = csmc.SmcWGetSoftLimit( Id , 1, ctypes.byref(PLimMode) , ctypes.byref(MLimMode) , ctypes.byref(PLimCount) , ctypes.byref(MLimCount) )
See Also