SmcWGetMoveStatus


Function

Retrieves motor motion status.

Format

Ret = SmcWGetMoveStatus( Id, AxisNo, MoveSts )

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.

MoveSts [ 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 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 [ 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

This function can be executed even if the axis 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.

VB.NET
Dim Ret As Integer
Dim MoveSts As Short
Ret = SmcWGetMoveStatus( Id , 1, MoveSts )

C, C++
long Ret;
short MoveSts;
Ret = SmcWGetMoveStatus( Id , 1, &MoveSts );

C#
int Ret;
short MoveSts;
Ret = Smc.WGetMoveStatus( Id , 1, out MoveSts );

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