DioDmSetSlaveCfg


Function

Sets the specified device to slave. Sets whether the synchronization control signal is used or not.

Format

Ret = DioDmSetSlaveCfg ( 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 whether the synchronization signal line is valid or not.

Value

[Dec]

Description

0

Invalid

1

Valid

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.
Slave 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 = DioDmSetSlaveCfg( Id , 1 , 1 , 1 , 1 , 1 );
 

Python

Ret = cdio.DioDmSetSlaveCfg( Id , 1 , 1 , 1 , 1 , 1 )
 

See Also

DioDmSetMasterCfg
DioDmSetStandAlone