© National Instruments Corporation 23 NI 6509 User Guide and SpecificationsChange Detection ExampleTable 3 shows a change detection example for six bits of one port.This example assumes the following line connections:• Bits 7, 6, 5, and 4 are connected to data lines from a four-bit TTLoutput device. The NI 6509 detects any change in the input data soyou can read the new data value.• Bit 1 is connected to a limit sensor. The NI 6509 detects rising edgeson the sensor, which correspond to over-limit conditions.• Bit 0 is connected to a switch. The NI 6509 reacts to any switchclosure, which is represented by a falling edge. If the switch closure isnoisy, enable digital filtering for this line.In this example, the NI 6509 reports rising edges on only bit 1, falling edgeson only bit 0, and rising and falling edges on bits 7, 6, 5, and 4. The NI 6509reports no changes for bits 3 and 2. After receiving notification of a change,you can read the port to determine the current values of all eight lines.However, you cannot read the lines that are configured for change detectionuntil a change detection interrupt occurs.Watchdog TimerThe watchdog timer is a software-configurable feature that sets criticaloutput lines to predefined safe states in the event of a software failure, asystem crash, or any other loss of communication between the applicationand the NI 6509.Table 3. Change Detection ExampleBit7 6 5 4 3 2 1 0Changes to detect — —Enable rising-edgedetectionyes yes yes yes no no yes noEnable falling-edgedetectionyes yes yes yes no no no yes