GX5295, File
Returns the input data comparator source.
DioGetInputDataSource (nHandle, nChannel, pnInputDataSource, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
DIO Master board handle, Board handle or File board handle. |
nChannel |
SHORT |
If Board Handle was passed:Channel number in the DIO board, each board has 32 I/O channels. I/O channels number range is 0-31.Each DIO board has 4 Auxiliary channels. Auxiliary channels number range is 0-3.If Master Board Handle was passed:Channel number in the DIO domain, each DIO board adds 32 I/O channels. I/O channels number range is 0-991 (1 master and 30 slaves).Each DIO board adds 4 Auxiliary channels, Auxiliary channels number range is 0-123 (1 master and 30 slaves). |
pnInputDataSource |
PSHORT |
Input data comparator can be as follows:0 DIO_LOW_THRESHOLD_COMPARATOR: data will be the result of the comparison done on the input data by the low threshold comparator, logic levels are as follows:Logic Low: whenever the input signal is below the low comparator threshold.Logic High: whenever the input signal is above the low comparator threshold.1 DIO_HIGH_THRESHOLD_COMPARATOR: data will be the result of the comparison done on the input data by the high threshold comparator, logic levels are as follows:Logic Low: whenever the input signal is below the high comparator threshold.Logic High: whenever the input signal is above the high comparator threshold. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The following example returns the input data comparator of channel 0:
SHORT nInputDataSource;
DioGetInputDataSource (nHandle, 0, &nInputDataSource, &nStatus);
DioSetupInputDataSource, DioSetupInputLoadCurrent, DioSetupInputLoadCommutatingVoltage, DioSetupInputLoadResistance, DioSetupInputThresholdVoltages, DioGetErrorString