Function
Outputs a byte (8 Bits) to a output port.
Format
Ret = DioOutByte ( Id , PortNo , Data )
Parameters
Id
[C:short] [Python: ctypes.c_short]
Specifies the device ID retrieved from DioInit.
PortNo [C:short]
[Python: ctypes.c_short]
Specifies the logical output port number.
The logical output port number is a number, which is assigned from the
first output port of the device as 0 to the last one serially.
Data [C:unsigned
char] [Python: ctypes.c_ubyte]
Specifies the output datum.
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_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. |
The other errors: (See also: Error code details)
Initial Value
The initial value of the output datum is 0, after the device was reset.
Remarks
Outputs a byte to the output port. The output datum is specified from 0H to FFH in hexadecimal.
Example
C |
Ret = DioOutByte (
Id , PortNo , Data ); |
Python |
Ret = cdio.DioOutByte
( Id , PortNo , Data ) |
See Also
DioOutBit
DioEchoBackByte
DioEchoBackBit
DioOutMultiByte
DioOutMultiBit
DioEchoBackMultiByte
DioEchoBackMultiBit
Logic_Bit