08-13-2008 02:44 PM
08-13-2008 02:46 PM
08-14-2008 02:12 PM
08-14-2008 02:23 PM
08-15-2008 02:20 PM
Hi ewong,
I'm sorry I forgot to attach the example I built with your first post. Is not a very clean code but it might help you get started. First task: (easy one)
is to generate two pulses at the same rate. Copy the same code you have for one pulse train in parallel with the first one (no wires dependency). Second with
want those to start at the same time, for that you will use the trigger capability of a counter. After you have accomplish this we will change the rate by making the
second counter output a pulse every time it counts 2 high ticks and to low ticks of the first counter.
08-20-2008 09:29 AM - edited 08-20-2008 09:38 AM
Jamie,
Sorry for the delayed response. Unfortunately that code does not quite do what I wanted. I should have explained exactly what it is I wanted to accomplish. I have a photodiode reading the light emitted from fast triplets emitted from the strobes I am testing. I have 6 sets of strobes and photodiodes, 3 flashing with .9ms between flashes and 3 flashing with .45ms between flashes. In my current program I set the photodiode low (to read) which "triggers" my finite pulse train (the triplet). I need it to trigger two pulse trains as described above. However my board (PCI-6221 w/ SCC-68) only has 2 counters. I dont know if it is possible to accomplish but it would be nice. I've been looking to see if I could possibley use p0.0 as it supposedly has the capability as well as the freq out pin. I'm attaching an update of my code. Thanks for all your help!
-Eric
08-21-2008 01:58 PM
Hi Ewong,
If you are doing a continuous pulse generation you can do it
with your 6221 since a continuous pulse generation uses only one counter, now if
this is going to be generating a finite amount of pulses then you are right you
won’t be able to do it with your card. If you want to use the FREQ OUT this KB
might help you: “How
Do I Program the Frequency Out (FREQ_OUT) Signal Using NI-DAQmx?.”
Going back to the previous post if your pulse is continuous you
will be able to do it with the attached code. I would suggest testing the code with a
scope.
08-22-2008 10:04 AM
Jaime (only now do I realize I've been spelling your name wrong, sorry!),
Thanks for all your help! I ended up running my program at double speed and using an AND switch with a digital signal to have one set of strobes run every trigger and the other set to run half the triggers. I also had to rewrite some of how the data was inerpreted but was able to get it to work the way I had hoped. Thanks again.
-Eric