SmcWGetStopStatus


Function

Retrieves motor stop factor.

Format

Ret = SmcWGetStopStatus( Id, AxisNo, StopSts )

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.

StopSts [ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of the variable that stores the motor stop factor.

0(H)

During motion

1(H)

Stop command

2(H)

Deceleration stop command

3(H)

Other axis stop

4(H)

Alarm Input

5(H)

Stop signal of positive direction limit

6(H)

Stop signal of negative direction limit

7(H)

Stop signal of positive direction deceleration

9(H)

The stop by PA/PB input overflow

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

You can retrieve the factor for motor stop while the argument PulseSts=0 on SmcWGetPulseStatus function.
The StopSts is always 0(During motion) when the argument PulsSts is not 0 on SmcWGetPulseStatus function.

This function can be executed even if the axis is in operation.

Example

The stop factor of the motor of axis number 1 is acquired.

VB.NET
Dim Ret As Integer
Dim StopSts As Short
Ret = SmcWGetStopStatus( Id , 1, StopSts )

C, C++
long Ret;
short StopSts;
Ret = SmcWGetStopStatus( Id , 1, &StopSts );

C#
int Ret;
short StopSts;
Ret = Smc.WGetStopStatus( Id , 1, out StopSts );

Python
Ret = ctypes.c_long()
StopSts = ctypes.c_short()
Ret.value = csmc.SmcWGetStopStatus( Id , 1, ctypes.byref(StopSts) )