Hello friends,
I am working on implementing trigger timeout for an analog output task. If no trigger is received for the task within X seconds after calling Start(), I need to stop the task. The task under discussion is configured as follows:
NiTask = new NationalInstruments.DAQmx.Task("AnalogOutputTask"); var hardwareInfo = HardwareInfo.Instance; NiTask.AOChannels.CreateVoltageChannel(hardwareInfo.AnalogOutputModuleName + "/ao0", "ao0", HardwareInfo.ChannelVoltageMinimum, HardwareInfo.ChannelVoltageMaximum, AOVoltageUnits.Volts); NiTask.AOChannels.CreateVoltageChannel(hardwareInfo.AnalogOutputModuleName + "/ao1", "ao1", HardwareInfo.ChannelVoltageMinimum, HardwareInfo.ChannelVoltageMaximum, AOVoltageUnits.Volts); NiTask.Timing.ConfigureSampleClock("", HardwareInfo.AnalogOutputSamplingRate, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples); NiTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("/" + hardwareInfo.SecondDigitalIoModuleName + "/PFI0", DigitalEdgeStartTriggerEdge.Falling); NiTask.Control(TaskAction.Verify);
As you can see, I have configured the task to use a start trigger on digital input PFI0. Implementing trigger timeout would be simplified greatly if I could know or get notified when a StartTrigger is received by the task.
Is there a way to know if/when a StartTrigger has been received by a Task? If not, is there some built in trigger timeout mechanism that I could utilize?