SmcWGetSoftLimit


Function

Retrieves the settings of behavior of the soft limit.

Format

Ret = SmcWGetSoftLimit( Id, AxisNo, PLimMode, MLimMode, PLimCount, MLimCount )

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.

PLimMode [ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ VB.NET: Integer ] [ C, C++: long * ] [ C#: out int ] [ Python: ctypes.POINTER(ctypes.c_long) ]
Specify the address of the variable that stores the value of [+] Side soft limit.
Range : -34217728 to 134217727

MLimCount [ VB.NET: Integer ] [ C, C++: long * ] [ C#: out int ] [ Python: ctypes.POINTER(ctypes.c_long) ]
Specify the address of the variable that stores the value of [-] Side soft limit.
Range : -34217728 to 134217727

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

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 axis is in operation.

Example

The set up information of the soft limit of axis number 1 is acquired.

VB.NET
Dim Ret As Integer
Dim PLimMode As Short
Dim MLimMode As Short
Dim PLimCount As Integer
Dim MLimCount As Integer
Ret = SmcWGetSoftLimit( Id , 1, PLimMode , MLimMode , PLimCount , MLimCount )

C, C++
long Ret;
short PLimMode;
short MLimMode;
long PLimCount;
long MLimCount;
Ret = SmcWGetSoftLimit( Id , 1, &PLimMode , &MLimMode , &PLimCount , &MLimCount );

C#
int Ret;
short PLimMode;
short MLimMode;
int PLimCount;
int MLimCount;
Ret = Smc.WGetSoftLimit( Id , 1, out PLimMode , out MLimMode , out PLimCount , out MLimCount );

Python
Ret = ctypes.c_long()
PLimMode = ctypes.c_short()
MLimMode = ctypes.c_short()
PLimCount = ctypes.c_long()
MLimCount = ctypes.c_long()
Ret.value = csmc.SmcWGetSoftLimit( Id , 1, ctypes.byref(PLimMode) , ctypes.byref(MLimMode) , ctypes.byref(PLimCount) , ctypes.byref(MLimCount) )

See Also

SmcWSetSoftLimit