GX5055, GX5295
Read back the validity of the current input pins levels.
DioReadIOPinsValidity (nHandle, pdwValidity, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
DIO or File board handle. |
pdwValidity |
PDWORD |
Read back the validity of the current input pins levels. Each bit represents a channel, e.g. bit 0 represents the validity of the input voltage at channels 0.A low represent valid input voltage and a high represent invalid input voltage, see comments for details. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function should be used with conjunction of DioReadIOPinsValue in order to get a complete picture of each input voltage level state. The following table summarizes the different results on a per bit basis:
Bit x read withDioReadIOPinsValidity |
Bit x read withDioReadIOPinsValue |
Comments |
0 |
0 |
Valid input voltage and input voltage level is less than the input low threshold level. |
1 |
Valid input voltage and input voltage level is greater than the input high threshold level. |
|
1 |
x |
Invalid input voltage, input voltage is greater than input low threshold level and less then high threshold level |
The following example reads the I/O pins values:
SHORT nStatus;
DWORD dwValidity;
DioReadIOPinsValidity (nHandle, &dwValidity, &nStatus);
DioWriteIOPinsValue, DioReadIOPinsValue, DioGetIOPinsStaticDirection, DioSetupIOPinsStaticDirection, DioGetErrorString