Doc. # 1-39807455 | |||
---|---|---|---|
Date Updated | 08-17-2004 | Date Created | 08-16-2004 |
Document Type | Knowledge Base | Related OS | |
Related Product | PCI-1756/ PCI-1756-A |
How to use the Advantech API to read/write DI status using the interrupt in PCI-1756? | |||
---|---|---|---|
Solution:
We can select the different Event Type such as ADS_EVT_INTERRUPT、ADS_EVT_INTERRUPT_IDI0 or ADS_EVT_INTERRUPT_IDI16.
Then Call the function DRV_FDItransfer to get the DI status.
The ADS_EVT_INTERRUPT could get all the DI status if the IDI0 or IDI16 generate a interrupt.
The ADS_EVT_INTERRUPT_IDI0 or ADS_EVT_INTERRUPT_IDI16 just get the corresponding group.
ADS_EVT_INTERRUPT is for all channels
ADS_EVT_INTERRUPT_IDI0 and ADS_EVT_INTERRUPT_IDI16 are for individual group.
Normally use, we can use the API,DRV_DioReadPortByte,to get all DI status.
But interrupt application we had better choose DRV_FdiTransfer to match trigger event , due to API,DRV_DioReadPortByte has 100 microsecond delay.
|