SmcWGetMoveStatus


Function

Retrieves motor motion status.

 

Format

Ret = SmcWGetMoveStatus( Id, AxisNo, MoveSts )

 

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.

 

MoveSts [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]

Specify the address of the variable that stores the motor motion status.

 

0

During stop

1

During PTP motion

2

During JOG motion

3

During origin return motion

4

The bank is operating.(single)

5

The bank is operating.(loop)

6

During Z-phase count motion

10

During Pulser motion

 

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. 

At Z-phase operation according to origin return motion (ORG motion)
   3 : During origin return motion

 

Example

The movement of the motor of axis number 1 is acquired.

 

C, C++

long Ret;

short MoveSts ;

Ret = SmcWGetMoveStatus( Id , 1, &MoveSts );

 

Python

Ret = ctypes.c_long()

MoveSts = ctypes.c_short()

Ret.value = csmc.SmcWGetMoveStatus( Id , 1, ctypes.byref(MoveSts) )

 

See Also