Discussion:
6602 : continuous pulse trains / one delayed by 1us?
(too old to reply)
ztruth
2006-09-27 21:40:11 UTC
Permalink
Hi All
I imagine this is simple but?
Using a 6602 card in lv7.1
How can I make 3 continuous pulse trains with one train delayed by 1us?
Thanks
Ryan
Mike_D
2006-09-29 00:10:09 UTC
Permalink
Hi Ryan,
The first step is to make a single continous pulse train. There is an example of this in the example finder under DAQmx\Generating Pulses. Choose the Gen Dig Pulse Train-Continuous-Dig Start.vi. This example can be modified to make two counters generate pulses in an individual task. To do this go to the control and choose browse then you can select multiple counters on your device by holding ctrl.
Make a second counter task with the same sequence of DAQmx VIs. Set the counter control for the second task to the third counter you will generate a pulse train from. Also set the time delay control to 1E-6, to get a one microsecond delay. The trigger for both tasks will share the same control. This will insure that all the tasks begin at the same time, thus the second task will start its counter generation one microsecond later. The vi attached below is the example with the necessary modifications.
Have a great day
 


Gen Multiple Dig Pulse Train-Continuous-Dig Start.vi:
http://forums.ni.com/attachments/ni/70/5530/1/Gen Multiple Dig Pulse Train-Continuous-Dig Start.vi
ztruth
2006-10-02 21:40:09 UTC
Permalink
The previous solution worked;
 
Now of course I need an upgrade to 4channels with more tweaks:
ch1 in synch with inverted ch2, ch3 delay 1us, ch4 delay 7 us.
 
I tried 4 seperate cntr tasks in parallel, setting the individual parameters and then using the same sync for all tasks; but when I looked at it on the scope it was not what I expected; (out of sync / delays not right)
 
I tried using 0 delay for all and they were still out of sync.
 
Is this a multiple tasks or cntr  limitation?
Mike_D
2006-10-02 23:10:11 UTC
Permalink
Hi
 
I was able to get it working, so it sounds like we set up our tasks differently. The attached VI does what you were asking, except for inverting one of the counter signals. I just tested it out though and got all four to trigger and start at the same time, as well as putting in offset start times for each individual task. I Please go ahead and try out this program, if you are still seeing the same issues let me know, because I want to make sure your application is working.
 
Have a marvelous monday,
 
Michael DentonMessage Edited by Mike_D on 10-02-2006 05:47 PM


4counters.vi:
http://forums.ni.com/attachments/ni/70/5548/1/4counters.vi
ztruth
2006-10-05 20:40:09 UTC
Permalink
Mike
My Computer crashed... ouch!
To recap; I am trying the 20mhz clock as trigger? I am not seeing proper delays I did not see proper delay with 1st example either.
how exactly are you triggering and measuring delay results?
Thanks Much
Ryan
ztruth
2006-10-12 12:40:13 UTC
Permalink
OK; Using a hardware trigger makes delay work for the # channels and resolutions I need. (1us/7us).
 
Thanks for the follow-ups.
 
Ryan
 

Loading...