12-02-2008 02:01 PM
Hello,
I have used LabView examples to create a VI to use with my TIO 6602 that generates a finite pulse train with varying duty cycle, frequency, number of pulse, and initial delay. I can also have it output the pulses through multiple counter channels, but all the channels have the same delay, and are output at the same time. I need each channel to have a specific delay from the first one.
In my VI, I use DAQmx to create a retriggerable finite pulse train by gating a counter with another counter. I have all the neccessary controls over the pulse train, but I can not seem to find an easy way to just copy this waveform and output delayed versions of it to other channels. The delay is very important because these signals will be used to drive ultrasound transducers in a linear array, and for the waveforms to focus at one point, the signal driving the transducers with a shorter distance from the focal point need a larger delay, so that the same waveform arrives from each transducer at the same time.
Any help with how I might do this would be much appreciated.
Thanks!
12-03-2008 12:36 PM
Hey Sneaky,
To do this you will need to use two counters for each finite pulse train. Finite pulse train generation requires one counter to generate the pulse train and another counter to generate the pulse that will be used to gate or pause the first counter. This means you will only be able to generate 4 finite pulse trains per 6602, unless you use an external source to gate each counter.
01-29-2009 01:47 PM
Thank you for your response John. Sorry it took me a while to respond.
So, knowing that I need 2 counters for each output, I am still unsure how to add more finite pulse generations to my VI. I basically used the example VI Gen Dig Pulse Train-Finite-Retriggerable, and I tried basically copy-pasting the block diagram multiple times within the VI with the same parameters but using different counters and delays. That however would not work.
I need a VI that I can specify the finite pulse train I want, set the delay for each output, press the run button, and have it output that pulse train to all 4 counter outputs with the specified delays from each other. Right now, I can make multiple VI's that create finite pulse trains on different counters, but the delay means nothing if all the VI's arent started at the exact same time. Also, it is a pain to have to input the same exact pulse train parameters to all 4 VI's. I need to have one VI with one set of parameters and one run button that will precisely delay the output of the same finite pulse train to each of 4 counters.
Thanks again!
01-30-2009 09:12 AM
Sneaky,
I don't have any hardware to test this right now but I'm pretty sure this will work. I'll use the Gen Dig Pulse Train-Finite-Retriggerable.vi example as a reference. On the front panel in the Channel Parameters , set the Counter(s) input as Dev1/ctr0:3 This sets the task up to use 4 counters with the same settings. Now set your trigger source up to be one of the remaining counters.
01-30-2009 02:47 PM
Hey Sneaky,
Centerbolt's concept is correct, but since we use paired counters for this acquisition the correct channel list is "Dev9/ctr0,Dev9/ctr2, Dev9/ctr4, Dev9/ctr6"
01-31-2009 11:19 AM
I have tried that, and it will output my pulse train to multiple counters, but each output needs to be slighty delayed from each other by an amount specified by the user. Is there a way to specify individual delays for each counter output?
02-02-2009 09:10 AM - edited 02-02-2009 09:13 AM
Sneaky,
Sorry, I missed that part of your problem. Instead of using one instance of DAQmx Create Channel to add all the counter channels to the task at one time, use 4 instances and add the channels to the task individually.
02-02-2009 10:34 AM - edited 02-02-2009 10:38 AM
Hey Sneaky,
Here's a screenshot of the code I put together on how to use multiple counters. Also, take a look here for more information on how to sync multiple counters.
02-05-2009 01:34 PM
Thanks for your response Knights, it helped a lot.
I noticed that you use one trigger source for all 4 of the "Start Digital Edge" block. Does this mean that I can use one counter as that trigger source and have potentially the last 7 counters as outputs?
Thanks again.
02-06-2009 05:19 PM
Hey Sneaky,
The finite pulse train requires two counters, as discussed before, so we will not be able to have 7 counters output, just 4. For the digital inputfor the trigger will be from one of your PFI lines on port 0.