Reads a port value.
Gx5733GetPort (nHandle, nPort, pdwValue, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX5733 board. |
nPort |
SHORT |
Digital I/O port numbers are as follow:
|
pdwValue |
PDWORD |
Returned port value, 32 bit integer where each bit represents a channel. Bit 0 for channel 0 and bit 31 for channel 31. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The following example reads port 1 value:
SHORT nStatus;
DWORD dwValue;
Gx5733GetPort (nHandle, 1, &dwValue, &nStatus);
Gx5733SetPort, Gx5733GetPortBit, Gx5733GetPortByte, Gx5733GetPortWord, Gx5733SetPortDirection