Digital Pattern Triggering

NI-DAQmx Key Concepts

Digital Pattern Triggering

For digital pattern triggering, you configure the device to detect a specific digital pattern on specific physical channels. After detecting this condition, the device performs the action associated with the trigger, such as starting the task or marking which sample was acquired when the trigger occurred.

The digital pattern is specified using the following characters:

  • X: ignore the physical channel
  • 0: Match on a logic low level on the physical channel
  • 1: Match on a logic high level on the physical channel
  • R: Match on rising edge on the physical channel
  • E: Match on either rising or falling edge on the physical channel
  • F: Match on falling edge on the physical channel

For instance, if you specify a pattern of "X11100" and a source of "dev1/line0:4,dev1/line6," the pattern match occurs when physical channels "dev1/line1," "dev1/line2," and "dev1/line3" are logic high and when physical channels "dev1/line4" and "dev1/line6" are logic low. "dev1/line0" is ignored.

For pattern triggers on ports, the pattern match occurs in reverse order. For instance, if you specify a pattern of "11000000" and a source of "dev1/port0," the pattern match occurs when physical channels "dev1/line0" and "dev1/line1" are logic high and the other six lines are logic low.