Function
Sets the Z-phase logic (positive logic/negative logic). Supports multi-processing.
Format
Ret = CntSetZLogic ( Id , ChNo , ZLogic )
Parameters
Id 
 [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short 
 ]
Specify the device ID retrieved from CntInit.
ChNo 
 [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short 
 ]
Specify the channel number for setting.
ZLogic 
 [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short 
 ]
Specify the Z-phase logic. Z-phase logic is selected from the following 
 Definition Value.
| Definition | Value | Description | 
| CNT_ZLOGIC_POSITIVE | 0 | Positive Logic | 
| CNT_ZLOGIC_NEGATIVE | 1 | Negative Logic | 
Return Value
Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]
| Definition | Value | Description | 
| CNT_ERR_SUCCESS | 0 | Normality completion | 
| CNT_ERR_SYS_RECOVERED_FROM_STANDBY | 7 | Execute the function CntResetDevice to return from the standby mode. | 
| CNT_ERR_DLL_INVALID_ID | 10001 | Invalid ID was specified. | 
| CNT_ERR_DLL_CALL_DRIVER | 10002 | CNT driver can't be called (Failed in the device I/O control). | 
| CNT_ERR_DLL_MODE | 10100 | Invalid mode setting. | 
| CNT_ERR_SYS_BOARD_EXECUTING | 20002 | Cannot use while by another device works. | 
| CNT_ERR_SYS_MODE | 20100 | Invalid mode setting. | 
| CNT_ERR_SYS_CH_NO | 20201 | Channel number is out of range. | 
The others: (See also: Details of Error Code)
Initial Value
Negative Logic
Remarks
Specifies the Z-phase logic of specified channel. This function becomes effective, when the counter is started.
It isn't occurred Error even though calling CntSetZlogic function when you set CNT_ZPHASE_NOT_USE by CntSetZmode function.
The internal logic level of Z-phase is hold. 
 All held settings are reflected to the device when the counter is stared. 
 
For example, the counter is started following the latest settings for Z-phase 
 by CntSetZlogic function when you change from CNT_ZPHASE_NOT_USE to CNT_ZPHASE_NEXT_ONE 
  (or CNT_ZPHASE_EVERY_TIME) in the middle.
Example
Sets the Z-phase of channel 0 to negative logic.
| VB.NET | Dim Ret As Integer | 
| C, C++ | long Ret; | 
| C# | int Ret; | 
| Python | Ret = ctypes.c_long() | 
See Also