I am using the NI USB-6251. I want to configure a counter (e.g. Dev1/ctr0) at a user-specified frequency and the rising edge on this counter should act as a start trigger for an analog input task and a digital output task.
I've tried to do this by creating a task for the counter:
integStartTriggerTask.COChannels.CreatePulseChannelFrequency(
"Dev1/ctr0",
"Integration Start Trigger",
COPulseFrequencyUnits.Hertz,
COPulseIdleState.Low,
0,
integFreqHz,
0.5);
and then connecting this to the StartTrigger for the analog input task:
analogReadTask.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("Dev1/ctr0", DigitalEdgeStartTriggerEdge.Rising);
However running this gives the error:
Source terminal to be routed could not be found on the device.
Make sure the terminal name is valid for the specified device. Refer to Measurement & Automation Explorer for valid terminal names.
Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.Source
Property: NationalInstruments.DAQmx.DigitalEdgeStartTrigger.Edge
Source Device: Dev1
Source Terminal: Dev1/ctr0
Task Name: analogReadTask
I have also tried "Dev1/ctr0/StartTrigger" instead of "Dev1/ctr0". What am I doing incorrectly? Thanks.