I'm trying to block program excecution until PXI1Slot6/Port1/Line1 goes high, but the Task.DigitalChangeDetection event never fires.
ManualResetEventSlim waitForTrigger = new ManualResetEventSlim();
using (Task task = new Task())
{
task.DIChannels.CreateChannel("PXI1Slot6/Port1/Line1", "", ChannelLineGrouping.OneChannelForAllLines);
task.Start();
task.DigitalChangeDetection += (e, o) =>
{
waitForTrigger.Set();
};
waitForTrigger.Wait();
}I can clearly see Port1/Line1 going high and low on the scope, but the DigitalChangeDetection event never fires. According to the documentation on the DigitalChangeEvent :
Occurs when a digital change is detected on any of the digital lines used in the task.
So why doesn't Port1/Line1 going high low fire the DigitalChangeDetection event?