DioDmSetStartPattern


Function

Sets the pattern matching condition for start condition.

Format

Ret = DioDmSetStartPattern ( Id , Pattern , Mask )

Parameters

Id [ VB.NET: Short ] [ C, C++: short ] [ C#: short ] [ Python: ctypes.c_short ]
Specify the device ID retrieved from DioInit.

Pattern [ VB.NET: Integer ] [ C, C++: unsigned long ] [ C#: uint ] [ Python: ctypes.c_ulong ]
Set the bit pattern to be compared.

Mask [ VB.NET: Integer ] [ C, C++: unsigned long ] [ C#: uint ] [ Python: ctypes.c_ulong ]
Mask the valid bits according to the pattern.
(Disabled: Bit = 0, Enabled: Bit = 1)

Return Value

Ret [ VB.NET: Integer ] [ C, C++: long ] [ C#: int ] [ Python: ctypes.c_long ]

Definition

Value

[Dec]

Description

DIO_ERR_SUCCESS

0

Normal completed.

DIO_ERR_SYS_RECOVERED_FROM_STANDBY

7

Execute DioResetDevice function because the device has recovered from standby mode.

DIO_ERR_DLL_INVALID_ID

10001

Invalid ID specified.

DIO_ERR_DLL_CALL_DRIVER

10002

Not call the driver (Failure on DEVICE I/O CONTROL).

DIO_ERR_SYS_NOT_SUPPORTED

20001

This board couldn't use this function.

The others (See also: Details of Error Code)

Initial Value

None

Remarks

This function is valid when DIODM_START_PATTERN is specified for the start condition by the DioDmSetStartTrigger function. And it is valid for only input.

Example

Sets the case of bit 0 = 0 and bit 1 = 1 for the pattern matching condition.

VB.NET

Dim Ret As Integer
Ret = DioDmSetStartPattern ( Id , &H2 , &H3 )
 

C, C++

long Ret;
Ret = DioDmSetStartPattern ( Id , 0x00000002 , 0x00000003 );
 

C#

int Ret;
Ret = dio.DmSetStartPattern ( Id , 0x00000002 , 0x00000003 );
 

Python

Ret = ctypes.c_long()
Ret.value = cdio.DioDmSetStartPattern ( Id , 0x00000002 , 0x00000003 )
 

See Also

DioDmSetStartTrigger