12-09-2009 12:59 PM
Hi,
I just recently bought a PXI 6602 and want to use it to generate 2 1MHz pulses that are in complementary phase of each other(i.e One is high and the other is Low). Now to do this I tried the following:
I used the DAQmx create virtual channel.vi with the instance CO Pulse Freq set the freq for ctr0 and ctr1. And then used ctr0 to trigger ctr1 on the digital edge to generate the complementary pulses but the problem i am facing is that I am able to generate the pulses but they are not truly complementary. There is a delay between the two pulses. I am stuck here and dont know how to remove the delay that I am encountering. Or if there is any other way to do this then please let me know.
I have attached a pic of the pulses that I described above.
I would really appreciate any help with this.
thanks.
12-09-2009 05:59 PM
This is also what I am trying to do now. My solution is that I created two continuous pulse generation task using ctr0 and ctr1. Both of them are syhchronized by a digital start trigger. The idle state of ctr0 is set to low and ctr1 is set to high. The duty cycle of ctr1 must be equal to 1- duty cycle of ctr0. I don't have that delay and it works good on PCI 6133.
The only issue is you can not keep these two output synchronized after you change the duty cycle when the tasks are running. Once the duty cycle changed, one counter output started to shift.
12-10-2009 09:30 AM
With some additional hardware, like a transistor or SN7404 inverter, you could create a complementary output using just one counter.
-AK2DM
12-10-2009 10:37 AM
I like AK2DM's suggestion of using an external inverter.
I also just wanted to point out that our new X Series devices offer buffered pulse generation so you could change the characteristics of your pulses on-the-fly based off of a sample clock (or provide an array of frequencies and duty cycles to be generated sequentially). The issue with the older boards is that any updates to the counters is software-defined so you cannot truly update the two counters simultaneously.
Also, an X Series or M Series that supports clocked digital I/O would be capable of updating multiple channels simultaneously using a Digital Output task.
Best Regards,
12-16-2009 07:51 PM
an external inverter is possibly the next step i have to take.
thanks