SmcWGetReady


Function

Retrieves the setting of beginning preparation and motor operation type/direction where basic operation begins operation.

Format

Ret = SmcWGetReady( Id, AxisNo, MotionType, StartDir )

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.

MotionType [ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of a variable to store the value that indicates the motor moving type.

0

Not moving

1

PTP moving

2

JOG Moving

3

Origin return moving

6

Z-phase count motion

StartDir [ VB.NET: Short ] [ C, C++: short * ] [ C#: out short ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of a variable to store the value that indicates the motor moving initial direction.

0

Positive direction

1

Negative direction

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.

Example

The motor operation type of basic operation of axis number 1 and the set up
information in the direction of the operation beginning are acquired.

VB.NET
Dim Ret As Integer
Dim MotionType As Short
Dim StartDir As Short
Ret = SmcWGetReady( Id , 1, MotionType , StartDir )

C, C++
long Ret;
short MotionType;
short StartDir;
Ret = SmcWGetReady( Id , 1, &MotionType , &StartDir );

C#
int Ret;
short MotionType;
short StartDir;
Ret = Smc.WGetReady( Id , 1, out MotionType , out StartDir );

Python
Ret = ctypes.c_long()
MotionType = ctypes.c_short()
StartDir = ctypes.c_short()
Ret.value = csmc.SmcWGetReady( Id , 1, ctypes.byref(MotionType) , ctypes.byref(StartDir) )

See Also

SmcWSetReady