Function
The number of Z-phase counts when Z-phase count according to Origin return motion or the numbers of Z-phase counts when Z-phase count operates are acquired.
Format
Ret = SmcWGetZCount( Id , AxisNo , ZMoveCount )
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.
ZMoveCount [ C, C++: short * ] [ Python: ctypes.POINTER(ctypes.c_short) ]
Specify the address of the variable that stores a present number of Z-phase counts.
Return Value
Ret [ C, C++: long ] [ Python: ctypes.c_long ]
0 |
Terminated normally |
Non-zero |
Terminated abnormally |
See also: Error code details
Remarks
The value (number of Z counts)
set with ZCount of SmcWSetOrgMode
or ZMoveCount of SmcWSetZCountMotion
is stored until Z-phase is detected.
Therefore, the acquisition value doesn't change when the number of Z counts
is set by "1".
Moreover, when the limit and the operation stop function are executed while
operating, the number of Z counts is stored.
This function can be executed even if the device is in operation.
Example
The number of Z-phase counts of axis number 1 is acquired.
C, C++
long Ret;
short ZMoveCount;
Ret = SmcWGetZCount( Id , 1, &ZMoveCount );
Python
Ret = ctypes.c_long()
ZMoveCount = ctypes.c_short()
Ret.value = csmc.SmcWGetZCount( Id , 1, ctypes.byref(ZMoveCount) )
See Also