INT32S DRV_DioEnableEventAndSpecifyDiPorts(
INT32U dwEventID,
INT32U dwScanStart,
INT32U dwScanCount );
On the device indicated by the DeviceHandle, it enables the event specified by dwEventID, and configs a port range to scan when the event occurs.
|
Name |
Direction |
Range |
Description |
|
DeviceHandle |
input |
default |
Retrieved from the DRV_DeviceOpen which specifies the target device. |
|
dwEventID |
input |
ADS_EVT_DI_INTERRUPT0~127 |
The event type users want to enable. |
|
dwScanStart |
input |
default |
The start port number to scan when the event occurs. |
|
dwScanCount |
input |
default |
The port count to scan when the event occurs. |
|
1. 0 |
Successful. |
|
2. InvalidDeviceHandle |
The DeviceHandle is NULL. |
|
3. InvalidChannel |
The port is configured incorrectly. The starting port number (dwPortStart) or the sum of the start number and the port count (dwPortCount) should not exceed the total DI port number. |
|
4. InvalidBuffer |
The user's buffer is configured incorrectly. It should not be NULL. |