10-20-2021 04:39 PM
Your front panel shows part of a DI channel name on port 1. Your device will only support change detection (or any other hw-clocked DIO) on port 0. This is the value of paying attention to errors, whether with a front panel indicator or an error dialog.
Also, in your change event case, you should read your samples or else you'll eventually fill your buffer and get a buffer overflow error.
As I recall (and it's been a long time), the # of samples can sometimes be greater than the # of hardware-side change detection pulses and the # hw-side pulses can sometimes be greater than the # of software-side events. Consequently, the safest thing to do is wire a -1 value into DAQmx Read as the # samples to read. In a continuous task that means "give me all the new samples that have arrived since my previous read".
-Kevin P