10-31-2006 02:14 PM
11-01-2006 04:25 PM
11-07-2006 10:44 AM - edited 11-07-2006 10:44 AM
Cool,
I am the same person just didn't log in the first time. How could I count the individual TTL pulses on each of the eight outputs programatically?
Message Edited by Quiksilver on 11-07-2006 10:47 AM
11-08-2006 10:13 AM - edited 11-08-2006 10:13 AM
Message Edited by Travis W on 11-08-2006 10:14 AM
11-08-2006 10:44 AM
Also Is there any way I can restart an individual counter after i have stopped it without stopping all the counters?
11-09-2006 10:42 AM
11-21-2006 11:56 AM
Hi it is me again
I think I have the code somewhat complete now However, I am having trouble stopping and restarting my task. When I start my program it does exactly what it is supposed to do and when I stop it the first time it does to but after that it doesnt. If I try to restart after I stop an individual pulse train (not the overall stop) my program outputs but my counter doesnt show how many counts have been output and also after I have stopped the second time the counter will not restart at all. Attached is my code any suggestions?
11-22-2006 11:28 AM - edited 11-22-2006 11:28 AM
Message Edited by Travis W on 11-22-2006 11:29 AM
02-20-2007 02:03 PM
02-21-2007 07:06 AM
Sounds like it should be feasible -- here's a couple tips to consider:
Since your counter pulsetrain will be hardware timed, you'll get the most reliable timing synchronization by setting up your DO task with a sampling clock. I *think* you'll want to make your DO task use the trailing edge of the counter pulsetrain as it's sampling clock. So the end of each pulse causes the 9 DO bits to set up the relays for the next pulse. This gives the relays plenty of response time so they'll be ready when the next pulse happens. Here's what I'd do:
1. Briefly create a static DO task on your 9 bits and write all bits to the "relay off" state. Clear the task. (The bits will remain in "relay off" state.)
2. Create a hw-timed DO task (using DAQmx Timing), specify your counter's output as the sampling clock, write your sequence of relay control bit patterns to the task, and start it. Nothing happens yet because the pulse train hasn't started.
3. Configure & start your counter pulsetrain task with freq = 1 Hz, duty cycle = 0.000035. If it's a finite generation, remember to generate the 1 extra pulse because nothing passes through the relays on the first pulse.
-Kevin P.