From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-29-2017 12:15 PM
Hello,
I am working on creating an application that outputs a waveform on an analog output. I would like to have my analog output task use an AnalogEdge as it's start trigger but this seems to be causing issues. The code for setting up my analog output task can be seen below..
_captureAnalogOutputTask = new Task();
_captureAnalogOutputTask.AOChannels.CreateVoltageChannel("Dev2/ao0", "ao0", -10, 10, AOVoltageUnits.Volts); _captureAnalogOutputTask.Timing.ConfigureSampleClock("", 5000, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 1000); _captureAnalogOutputTask.Triggers.StartTrigger.ConfigureAnalogEdgeTrigger("/Dev2/ai2", AnalogEdgeStartTriggerSlope.Rising, 1);
_captureAnalogOutputTask.Control(TaskAction.Verify);
More specifically, the following exception is thrown when I call the ConfigureAnalogEdgeTrigger function..
An exception of type 'NationalInstruments.DAQmx.DaqException' occurred in NationalInstruments.DAQmx.dll but was not handled in user code
Additional information: Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: NationalInstruments.DAQmx.StartTrigger.Type Requested Value: NationalInstruments.DAQmx.StartTriggerType.AnalogEdge Possible Values: NationalInstruments.DAQmx.StartTriggerType.DigitalEdge, NationalInstruments.DAQmx.StartTriggerType.None
Now seems like a good time to mention that I am using the NI USB-6218 BNC DAQ M-Series device. It seems like this exception implies that my device does not support using analog inputs as start triggers but, that is only a guess.
What's the issue here?
Thanks!
Solved! Go to Solution.
11-29-2017 03:36 PM
After reading the Analog Triggering Considerations for C Series, E Series, M Series, and S Series Devices my understanding is that it is not possible to trigger an analog output task from an analog start trigger, it is only possible for an analog input task. Can someone confirm this?
11-30-2017 03:54 PM - edited 11-30-2017 03:58 PM
Hi there,
There is no trigger function for an analog output, this since you are able to completely program when you want it to start outputting a signal. You could use an analog input with an "if structure" and configure when to start your analog output.
Does that help?
11-30-2017 07:50 PM
Andres,
There is a digital trigger function for an analog output so I ended using that instead. The following statement sets a digital start trigger for my analog output task.
_stageTwoCaptureAnalogOutputTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("/Dev3/PFI1", DigitalEdgeStartTriggerEdge.Rising);
12-01-2017 02:28 PM
I see, thanks for putting me up to speed! Success!