04-08-2010 02:36 PM
Hello-
I am trying to set up a task to asyncronously read in from an analog input channel when it reaches a specified voltage. It looks from the help as though I should be able to do this by configuring the tast with an AnalogEgeTrigger, then setting up an asyncronous read operation on that channel based off the the trigger...something like:
Task analogInputTask = GetAnalogOutputTask(channel, eDirection);
analogInputTask.Triggers.StartTrigger.ConfigureAnalogEdgeTrigger(channelName, slope, value);
AnalogSingleChannelReader reader = new AnalogSingleChannelReader(analogOutputTask.Stream);AsyncReadArgs args = new AsyncReadArgs(channel, value);
reader.BeginReadSingleSample(new AsyncCallback(MfxArmMovementMonitor), (object)args);
However, the line:
analogInputTask.Triggers.StartTrigger.ConfigureAnalogEdgeTrigger(channelName, slope, value);
Is throwing the exception:
Requested value is not a supported value for this property.
Property: NationalInstruments.DAQmx.StartTrigger.Type
You Have Requested: NationalInstruments.DAQmx.StartTriggerType.AnalogEdge
You Can Select: NationalInstruments.DAQmx.StartTriggerType.DigitalEdge, NationalInstruments.DAQmx.StartTriggerType.None
Task Name: AxMFx_AGLTaskMonitor
Status Code: -200077
Has anyone else seen this, or is this not supported on the 6221? Is there a workaround?
-Bill
Solved! Go to Solution.
04-08-2010 03:36 PM
I called NI Support and was told this wasn't possible.
If anyone has a clever work-around, please let me know.