I'm new to using DAQmx, so forgive me if I'm barking up the wrong tree.
I am trying to generate a multi-channel pulse sequence using counter outputs on a PCI6602 with the BNC-2121 accessory. Eventually I want different pulses on all the channels (by specifying different delays/durations when configuring each channel) but for now I am just trying to get 4 synchronous square pulses out.
In MAX, I create a task and add 4 counter channels to it (Ctr2 through Ctr5), all with the same initial delay/high time/low time, run the task, and look at the output on the scope. The 4 pulses are made and have the correct durations, but are not synchronous. The 2nd pulse configured starts a few microseconds after the 1st one, and so on, even though they are identically configured. I can fudge it a bit by configuring an initial delay to each of the pulses, but that feels pretty kludgey and unreliable.
I have also tried this in code using the PyDAQmx wrapper (since my final application is written in Python), and get the same result. I tried making a separate task for each channel, and using CfgDigEdgeStartTrig to trigger Ctr3 off of Ctr2InternalOutput. I feel like this worked once, but now I am only getting "resource reserved" errors - and from reading the manual I get the impression that running multiple tasks in the same subsystem is not something that is supposed to work at all.
I'm pretty new to a lot of these DAQ concepts and would appreciate any help orienting me toward the proper way of making multi-channel pulse trains. Thanks!
↧
Multi channel pulse generation with NI-DAQmx
↧