CntSetZLogic


Function

Sets Z phase logic. (Positive logic/Negative logic)

Format

Ret = CntSetZLogic ( Id , ChNo , ZLogic )

Parameters

Id [C: short] [Python: ctypes.c_short]
Specifies the device ID retrieved from CntInit.

ChNo [C: short] [Python: ctypes.c_short]
Specifies the channel number which you want to set.

ZLogic [C: short] [Python: ctypes.c_short]
Specifies Z phase logic. Select Z phase logic from the following defined values.

Definition

Value

Description

CNT_ZLOGIC_POSITIVE

0

Positive Logic

CNT_ZLOGIC_NEGATIVE

1

Negative Logic

Return Value

Ret [C: long] [Python: ctypes.c_long]

Definition

Value

Description

CNT_ERR_SUCCESS

0

Normal Complete

CNT_ERR_DLL_INVALID_ID

10001

Invalid ID is specified.

CNT_ERR_DLL_CALL_DRIVER

10002

Driver cannot be called (failed in ioctl).

CNT_ERR_DLL_MODE

10100

Invalid mode setting.

CNT_ERR_SYS_MODE

20100

Invalid mode setting.

CNT_ERR_SYS_CH_NO

20201

Channel number is outside the range.

The other errors: (See also: Details of Error Code)

Initial Value

Negative Logic

Remarks

Specifies Z phase logic for the specified channel. The setting in this function is effective after the counter starts.

Example

C

Ret = CntSetZLogic(Id, ChNo, ZLogic);
 

Python

Ret = CntSetZLogic(Id, ChNo, ZLogic)
 

See Also

CntGetZLogic