Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

AnalogEdgeTrigger Support on 6221 (OEM)

Solved!
Go to solution

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

0 Kudos
Message 1 of 2
(2,873 Views)
Solution
Accepted by topic author Tyzack

I called NI Support and was told this wasn't possible.

 

If anyone has a clever work-around, please let me know.

0 Kudos
Message 2 of 2
(2,867 Views)