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 [ C, C++: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved by SmcWInit function.
AxisNo [ C, C++: short ] [ Python: ctypes.c_short ]
Specify the axis number.
MotionType [ C, C++: 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 [ C, C++: 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 [ 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 motor operation type of basic operation of axis number 1 and the set up information in the direction of the operation beginning are acquired.
C, C++
long Ret;
short MotionType ;
short StartDir ;
Ret = SmcWGetReady( Id , 1, &MotionType , &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