I have been searching around without finding a solution, so I hope somebody here can help me!
I plan do to correlated digital output on an M series board (6229).
This article explains that CDO is possible by means of a timer of another subsystem or an external source.
I would like to develop a system that behaves like:
1. A counter serves as the master trigger.
2. A digital output task is triggered by the counter (rising edge)
My .NET C# code contains:
---
Task SuperTask = new Task("SuperTask");
SuperTask.COChannels.CreatePulseChannelFrequency("Dev2/ctr0", "SuperTrigger",COPulseFrequencyUnits.Hertz,COPulseIdleState.Low,0,1000,0.1);
// no trigger, started by run()
SuperTask.Triggers.StartTrigger.ConfigureNone();
SuperTask.Control(TaskAction.Verify);
Task SubTaskDO = new Task ("SubTaskDO");
SubTaskDO.DOChannels.CreateChannel("Dev2/port0/line0:7", "DigiOutTask",ChannelLineGrouping.OneChannelForAllLines);
// triggering is not possible. use a "correlated clock" of another subsystem
// timing: correlated clock=Dev2/ai/SampleClock, 1 kHz, 500 samples
SubTaskDO.Timing.ConfigureSampleClock("/Dev2/ai/SampleClock",1000,SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 500);
SubTaskDO.Control(TaskAction.Verify);
---
The question is: how can I make the ctr0 trigger /Dev2/ai/SampleClock? Or in which other way can I use ctr0 as a trigger for correlated digital output?
Thanks in advance!
Cz.