CntSetZMode


Function

Sets Z phase mode. (Not use/1 time/Every time)

Format

Ret = CntSetZMode ( Id , ChNo , Mode )

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.

Mode [C: short] [Python: ctypes.c_short]
Specifies Z phase mode. Selects the Z phase mode from the following defined values.

Definition

Value

Description

CNT_ZPHASE_NOT_USE

1

Not use

CNT_ZPHASE_NEXT_ONE

2

Next one time

CNT_ZPHASE_EVERY_TIME

3

Every time

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

Not use Z phase

Remarks

Specifies the Z phase mode for the specified channel. The setting in this function is effective after this function is executed.
And, this setting is different from the other mode settings, the mode can be changed while the counter is running.

Example

C

Ret = CntSetZMode(Id, ChNo, Mode);
 

Python

Ret = ccnt.CntSetZMode(Id, ChNo, Mode)
 

See Also

CntGetZMode