DioDmSetMasterCfg


Function

Sets the specified device as a master. Also, sets the contents to be output as the synchronization signal.

Format

Ret = DioDmSetMasterCfg ( Id , ExtSig1 , ExtSig2 , ExtSig3 , MasterHalt , SlaveHalt )

Parameters

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

ExtSig1 [C:unsigned long] [Python: ctypes.c_ulong]
ExtSig2
[C:unsigned long] [Python: ctypes.c_ulong]
ExtSig3
[C:unsigned long] [Python: ctypes.c_ulong]
Specify signals output to the signal lines from ExtSig1 to ExtSig3.

Definition

Value

[Dec]

Description

DIODM_EXT_START_SOFT_IN

1

Software start (Pattern input)

DIODM_EXT_STOP_SOFT_IN

2

Software stop (Pattern input)

DIODM_EXT_CLOCK_IN

3

Internal clock (Pattern input)

DIODM_EXT_EXT_TRG_IN

4

External clock (Pattern input)

DIODM_EXT_START_EXT_RISE_IN

5

External rising trigger start(Pattern input)

DIODM_EXT_START_EXT_FALL_IN

6

External falling trigger start(Pattern input)

DIODM_EXT_START_PATTERN_IN

7

Pattern matching (Pattern input)

DIODM_EXT_STOP_EXT_RISE_IN

8

External rising trigger stop(Pattern input)

DIODM_EXT_STOP_EXT_FALL_IN

9

External falling trigger stop(Pattern input)

DIODM_EXT_CLOCK_ERROR_IN

10

Clock error (Pattern input)

DIODM_EXT_HANDSHAKE_IN

11

handshake (Pattern input)

DIODM_EXT_START_SOFT_OUT

101

Software start (Pattern output)

DIODM_EXT_STOP_SOFT_OUT

102

Software stop (Pattern output)

DIODM_EXT_CLOCK_OUT

103

Internal clock (Pattern output)

DIODM_EXT_EXT_TRG_OUT

104

External clock (Pattern output)

DIODM_EXT_START_EXT_RISE_OUT

105

External rising trigger start(Pattern output)

DIODM_EXT_START_EXT_FALL_OUT

106

External falling trigger start(Pattern output)

DIODM_EXT_STOP_EXT_RISE_OUT

107

External rising trigger stop(Pattern output)

DIODM_EXT_STOP_EXT_FALL_OUT

108

External falling trigger stop(Pattern output)

DIODM_EXT_CLOCK_ERROR_OUT

109

Clock error (Pattern output)

DIODM_EXT_HANDSHAKE_OUT

110

Handshake (Pattern output)

MasterHalt [C:unsigned long] [Python: ctypes.c_ulong]
1:Fixed(Valid)

SlaveHalt [C:unsigned long] [Python: ctypes.c_ulong]
1:Fixed(Valid)

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_SIGNAL

50001

Outside the range of the signal.

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

Initial Value

Stand-alone should be specified from the choice of Stand-Alone, Master, or Slave.

Remarks

One of the settings must be executed from Stand-Alone, Master, or Slave to fix the application operation.
Master indicates the board where the synchronization signal is output in the case of operating a number of boards in synchronization using a synchronization control connector (SC connector).

Example

C

Ret = DioDmSetMasterCfg( Id, DIODM_EXT_START_SOFT_IN, DIODM_EXT_CLOCK_IN, DIODM_EXT_STOP_SOFT_IN, 1, 1 );
 

Python

Ret = cdio.DioDmSetMasterCfg( Id, cdio.DIODM_EXT_START_SOFT_IN, cdio.DIODM_EXT_CLOCK_IN, cdio.DIODM_EXT_STOP_SOFT_IN, 1, 1 )
 

See Also

DioDmSetSlaveCfg
DioDmSetStandAlone