PCIe-6509 Change Detection

You can enable the PCIe-6509 DIO change detection circuitry to detect rising edges (0 to 1), falling edges (1 to 0), or both edges on selected input lines or on all input lines.

When an input change occurs, the PCIe-6509 generates an interrupt and notifies the software. However, the PCIe-6509 does not report which line was changed or if the line was rising or falling. After a change, you need to read the input lines to determine the current line states. The rate of change detection is determined by the software response time, which varies from system to system.

Note Excessive change detections may affect system performance. Use digital filtering to minimize the effects of noisy input lines.

An overflow bit indicates that the PCIe-6509 detects an additional rising or falling edge before the software processes the previous change.

Refer to NI-DAQmx User Manual for information about how to set up and implement the change detection feature.

Change Detection Example

The following table shows a change detection example for six bits of one port.

Table 5. Change Detection Example
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Changes to detect
1378
1378
1378
1378
1378
1378
Enable rising-edge detection yes yes yes yes no no yes no
Enable falling-edge detection yes yes yes yes no no no yes
In this example, the line connections are as follows:
  • Bits 7, 6, 5, and 4 are connected to data lines from a four-bit TTL output device. The PCIe-6509 detects any change in the input data so you can read the new data value.
  • Bit 1 is connected to a limit sensor. The PCIe-6509 detects rising edges on the sensor, which corresponds to over-limit conditions.
  • Bit 0 is connected to a switch. The PCIe-6509 can react to any switch closure, which is represented by a falling edge. If the switch closure is noisy, enable digital filtering for this line.
After an input change occurs, the PCIe-6509 reports the following:
  • Bits 7, 6, 5, and 4: Rising and falling edges
  • Bit 1: Rising edges
  • Bit 0: Falling edges
  • Bits 3 and 2: No changes

After receiving the change notification, you can read the port to determine the current values of all eight lines. However, for the lines where the change detection is enabled, you cannot read the line state until the change detection interrupt occurs.