SmcWGetStopStatus


Function

Retrieves motor stop factor.

 

Format

Ret = SmcWGetStopStatus( Id, AxisNo, StopSts )

 

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 axis number.

 

StopSts [ C, C++: 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/urgent stop signal

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

ff(H)

End of operation function

 

Return Value

Ret [ C, C++: long ] [ 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 device is in operation.

 

Example

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

 

C, C++

long Ret;

short StopSts ;

Ret = SmcWGetStopStatus( Id , 1, &StopSts );

 

Python

Ret = ctypes.c_long()

StopSts = ctypes.c_short()

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

 

See Also