03-14-2019 12:19 PM
Hi Everyone,
i wanna use one (or more) counter(s) to control for example 10 channels. The first target is, that every channel can output a digital signal one by one every 10 microsecond. And second is, that one channel output a high level digital signal and after 50 microsecond will be low.
Cloud you give me some suggestions. Thank you 🙂
Solved! Go to Solution.
03-14-2019 01:34 PM
This sounds to me like a job for a hw-timed digital output task rather than a counter task. What DAQ hardware device(s) do you have available for this app?
If using a desktop DAQ board, I'd steer you toward something like a PCIe-6323, which is not limited to 8 hw-timed DO lines and which can derive its own sample clock for DO.
-Kevin P
03-14-2019 01:44 PM
Thank you for your fast response. I have just 3 USB-6259 devices. It is limited for many functions. Do you mean, that i should try the HW-DO modi?
03-14-2019 01:55 PM
I have 3 USB-6259 ,just these. And the timepoint of the output best is variable. For example, I need to control 4 DO,DO0,DO1,DO2,DO3. DO0 output at 10 us and continues for 20us. DO1 output at 15us and continues for 30us. And so on.
03-14-2019 04:39 PM
Your USB-6259 devices ought to be able to work, but it's an M-series device where DO tasks can't produce their own sample clock. That's not too big a deal because you can still drive hw-timed DO by generating a clock with one of the counters. To learn more, search for "correlated DIO".
Note that only the lines on port 0 can be hw-clocked. All 4 DO lines will need to be part of the same task, so you'll need to define all 4 states at each sample time.
For example, let's suppose you generate a 1 MHz pulse train with a counter that you use as the DO task's sample clock. You'd have 10 samples of all DO lines LOW (microseconds 0-9). Then you'd have 5 samples with only DO0 HIGH (microseconds 10-14). Then you'd have 15 samples with both DO0 and DO1 HIGH (microseconds 15-29). Then another 15 samples with only DO1 HIGH (microseconds 30-44). And so on, as you work out how to add in the timing for DO2 and DO3.
I wouldn't be surprised if there's an example around somewhere for building up multi-line digital patterns like this, but I didn't find anything relevant in a quick search. The code for doing it isn't terribly complicated though, just watch out for off-by-one errors due to quantization or rounding. (Here, off-by-one errors are likely to show up as digital state changes that happen 1 sample earlier or later than they should.)
-Kevin P
03-14-2019 04:52 PM
thank you very much, i will try it.
03-15-2019 03:47 AM
Thank you very much!
I just need to convert at first my time plan in T/F array.