Nuvo-7501 Series
87
DIO Functions
InitDIO
Syntax
BOOL InitDIO(void);
Description
Initialize the DIO function. You should always invoke InitDIO()
before write/read any DIO port/channel.
Parameter
None
Return Value
Returns TRUE if initialization successes, FALSE if initialization
failed.
Usage
BOOL bRet = InitWDT()
DIReadLine
Syntax
BOOL DIReadLine(BYTE ch);
Description
Read a single channel of isolated digital input.
Parameter
ch
BYTE value specifies the DI channel to be read. C
h
should be
a value of 0 ~ 7.
Return Value
The status (TRUE or FALSE) of the specified DI channel.
Usage
BYTE ch=3; //DI channel #3
BOOL DIChValue = DIReadLine(ch); //read DI channel #3
DIReadPort
Syntax
WORD DIReadPort(void);
Description
Read the entire isolated digital input port (8 channels).
Parameter
None
Return Value
A WORD value (0~255) indicates the status of DI port (8 DI
channels).
Usage
WORD DIPortValue = DIReadPort ();