SmcWGetZCount


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

ZMoveCount [ VB.NET: Short ] [ C, C++: short * ] [ C#: out 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 [ 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

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 axis is in operation.

Example

The number of Z-phase counts of axis number 1 is acquired.

VB.NET
Dim Ret As Integer
Dim ZMoveCount As Short
Ret = SmcWGetZCount( Id , 1, ZMoveCount )

C, C++
long Ret;
short ZMoveCount;
Ret = SmcWGetZCount( Id , 1, &ZMoveCount );

C#
int Ret;
short ZMoveCount;
Ret = Smc.WGetZCount( Id , 1, out ZMoveCount );

Python
Ret = ctypes.c_long()
ZMoveCount = ctypes.c_short()
Ret.value = csmc.SmcWGetZCount( Id , 1, ctypes.byref(ZMoveCount) )