Function
Retrieves the status of multiple output ports.
Format
Ret = DioEchoBackMultiByte ( Id , &PortNo[0] , PortNum , &Data[0] )
Parameters
Id
[C:short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.
PortNo [C:short
*] [Python: ctypes.POINTER(ctypes.c_short)]
Stores the logical output port numbers into a array. Specifies the base
address of this array.
PortNum
[C:short] [Python: ctypes.c_short]
Specifies the number of ports which are specified by PortNo. The maximum
number of ports is 256.
Data [C:unsigned
char *] [Python: ctypes.POINTER(ctypes.c_ubyte)]
Specifies the base address of the array to store the output data. The output
data are returned in hex number from 0H to FFH.
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_DLL_BUFF_ADDRESS |
10100 |
Invalid data buffer address. |
DIO_ERR_SYS_NOT_SUPPORTED |
20001 |
This function cannot be used for this device. |
DIO_ERR_SYS_PORT_NO |
20100 |
Port number is outside of the available range. |
DIO_ERR_SYS_PORT_NUM |
20101 |
Number of ports is outside of the available range. |
The other errors: (See also: Error code details)
Initial Value
The initial value of the output data is 0, after the device was reset.
Remarks
Retrieves the status of multiple output ports.
Before this function is called, it is necessary that the logical output
ports to be input numbers are set into the array specified by PortNo.
The data are stored in the array Data in the order that the logical ports
are specified by PortNo.
The output data are returned in hex number
from 0H to FFH.
This function is used for monitoring the outputting contents.
Example
C |
Ret = DioEchoBackMultiByte(
Id , &PortNo[0] , PortNum , &Data[0] ) |
Python |
Ret = cdio.DioEchoBackMultiByte(
Id , PortNo , PortNum , Data ) |
See Also
DioOutByte
DioOutBit
DioEchoBackByte
DioEchoBackBit
DioOutMultiByte
DioOutMultiBit
DioEchoBackMultiBit
Logic_Bit