Interrupt Notification Speeds by Device (Digital)

This data is a measurement of the time required for interrupt notifications using the interrupt notification function provided by Contec’s Windows and Linux drivers using representative products selected from the PC-HELPER series PC measurement control device digital input/output products that use various buses. In addition, measurement values are based on actual measurements performed in the operating environment prepared by Contec. Average execution times will vary depending on the hardware and software configuration.

Measurement conditions

The digital input signal must be changed to generate an interrupt. A digital output terminal corresponding to output logic bit 0 of the device being measured and a digital input terminal corresponding to input logic bit 0 for interrupt generation are connected.

  • *
    The digital output of a device in the same series is used for devices without a digital output.
  • *
    A separate power supply is required for insulated devices without an internal power supply.

Measurement method

Using the interrupt notification function of the digital input function, an interrupt can be generated when the input signal changes from either 0 to 1 (rising edge) or 1 to 0 (falling edge). The notification will then be received by the application.With the interrupt notification set to the rising edge, the digital output operation for changing the digital input required to generate the interrupt notification and the processing time for receiving the notification by the application was measured.Because the processing time varies based on OS task scheduling, the average value was calculated from 10,000 executions.With insulated-type devices, note that the device response time is slower than the software execution time, making it necessary to delay the output signal until the output signal is reliably changed with a 200 µsec wait added. This time is also included in the average measurement execution time.

  

Process

Flow chart

Notification reception method

 

Interrupt notifications can be received in two ways: using window messages or callbacks. (Windows devices can use both, while Linux devices can only obtain callback data.)

Window message A message is sent from the driver to the specified application window.
* Can only be used with window-based Windows applications.
Callback The specified application function is called from the driver.
* The function formats that can be specified are limited.

Measurement results

 

Interrupt notifications are likely to be handled more quickly by using callbacks instead of windows messages.Not only products from different buses, but even products from the same bus can have different tendencies. The average execution time varies depending on the bus used by the device and the product series and is intended as a guide for selecting products.A PC with a fast CPU will not necessarily offer fast bus speeds. Changing to a different PC—even one that does not specifically have a higher spec CPU—may improve performance.Refer to “I/O response performance measurements by device (analog, digital, counter)” for information on execution times of functions used to change digital I/O.

Measurement results

Measurement condition ①

    
PC CPU AMD Ryzen Threadripper 3960X 24-Core Processor 3.79GHz
RAM 64GB
OS Windows Windows10 21H1 64bit
Linux Ubuntu 20.04.2 LTS 5.8.0-43-generic (x86_64)
Driver Windows API-DIO(WDM) Ver.9.20
Linux API-DIO(LNX) Ver.7.71
Measurement software development language Windows Microsoft Visual C++(MFC)
Linux gcc

Measurement condition ②

    
PC CPU Intel Core i5-8500 (3.00GHz)
RAM 16GB
OS Windows Windows10 21H1 64bit
Linux Ubuntu 20.04.2 LTS 5.8.0-43-generic (x86_64)
Driver Windows API-DIO(WDM) Ver.9.20
Linux API-DIO(LNX) Ver.7.80
Measurement software development language Windows Microsoft Visual C++(MFC)
Linux gcc

Windows

                                                                                                                                                    
Bus Device Type Measurement conditions Window messageCallback
USB DIO-1616LN-USB isolated3.0[msec]2.0[msec]
1.3[msec]1.0[msec]
DIO-1616LX-USB isolated8.3[msec]4.3[msec]
7.6[msec]4.0[msec]
CC-USB271-CPSN4 + CPSN-DI-08L isolated15.6 [msec]15.6 [msec]
15.6 [msec]15.6 [msec]
PCI Experss DIO-1616L-PE isolated231.9[µsec]224.1[µsec]
338.7[µsec]315.3[µsec]
DIO-3232T-PE non-isolated28.2[µsec]19.0[µsec]
62.9[µsec]39.1[µsec]

Linux

                                                                                                          
Bus Device Type Measurement conditions Callback
USB DIO-1616LN-USB isolated3.0[msec]
2.0[msec]
DIO-1616LX-USB isolated5.0[msec]
4.7[msec]
PCI Experss DIO-1616L-PE isolated274.8[µsec]
617.6[µsec]
DIO-3232T-PE non-isolated14.2[µsec]
218.6[µsec]

To PageTop