DioDmSetStopTrg


Function

Sets stop conditions for sampling and generating.

Format

Ret = DioDmSetStopTrg ( Id , Dir , Stop )

Parameters

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

Dir [C:unsigned long] [Python: ctypes.c_ulong]
Set transfer direction.

Definition

Value

[Dec]

Description

DIODM_DIR_IN

1

Input

DIODM_DIR_OUT

2

Output

Stop [C:unsigned long] [Python: ctypes.c_ulong]
Set stop conditions.

Definition

Value

[Dec]

Description

DIODM_STOP_SOFT

1

Software stop

DIODM_STOP_EXT_RISE

2

External rising trigger

DIODM_STOP_EXT_FALL

3

External falling trigger

DIODM_STOP_NUM

4

Transfer is completed by the specified number

DIODM_STOP_EXTSIG_1

5

SC connector EXTSIG1

DIODM_STOP_EXTSIG_2

6

SC connector EXTSIG2

DIODM_STOP_EXTSIG_3

7

SC connector EXTSIG3

EXTSIG1 ~ EXTSIG3 are valid only in the case of slaves.

Return Value

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

Definition

Value

[Dec]

Description

DIO_ERR_SUCCESS

0

Normal complete

DIO_ERR_DLL_INVALID_ID

10001

Invalid ID is specified.

DIO_ERR_DLL_CALL_DRIVER

10002

Driver cannot be called (failed in ioctl).

DIO_ERR_SYS_DIRECTION

50000

I/O direction is outside of the setting range.

DIO_ERR_SYS_STOP

50006

Stop condition is outside of the setting range.

The other errors: (See also: Error code details)

Initial Value

The default is software stop.

Remarks

Stop conditions must be set for the application operation to be constant.
Software stop (DioDmStop) is always valid in the event that any stop condition is set.

Example

C

Ret = DioDmSetStopTrg( Id , DIODM_DIR_IN , DIODM_STOP_SOFT );
 

Python

Ret = cdio.DioDmSetStopTrg( Id , cdio.DIODM_DIR_IN , cdio.DIODM_STOP_SOFT )
 

See Also

DioDmSetStopNum
DioDmStop