03-06-2007 06:47 PM
03-07-2007 06:01 PM
Hi Paul,
Thank you for posting to the NI forums. Which DAQ device are you using? You application is a little bit too complex to use just the DAQ Assistant. I would recommend getting started with one of the DAQmx examples, namely “Cont Write Dig Port-Ext Clk-Non Regeneration.vi”. This can be found by going to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Digital Generation.
You will have to modify the example to output your particular waveform, but it should be enough to get you started.
I hope this helps – post back if you have further questions. Thanks!
Ed W.
Applications Engineer
National Instruments
03-09-2007 05:22 PM
03-09-2007 07:35 PM
Any finite pulse train will end up using both the counter you ask for and its "pair". On your board, counters 0 and 1 are all you've got so the finite pulse train needs them both. You can't do that at the same time that you use one for a continuous pulsetrain.
There's a sneaky trick though. Instead of using a counter to generate a 500 Hz pulse train, create a dummy continuous AI task that samples at 500 Hz. (You may need to configure the AI task to allow unread samples to be overwritten. It's in one of the DAQmx property nodes, I don't recall which right now.) When you specify the retriggerable finite pulse train's trigger signal, you would pick the one with a name like "AISampleClock".
-Kevin P.
03-12-2007 02:33 PM
03-12-2007 04:50 PM
I'm pretty sure my earlier idea is the simplest way to do what you want with the 6034 board you have. I *do* know another technique that could work but I would consider it more complex conceptually and a larger departure from using a shipped example. [Basic idea: 1 continous 500 Hz pulse train with a high time of 40 microsec and low time of 1960 microsec. Also 1 continuous square pulse train with a period of 10 microsec. The second counter task is configured for "pause triggering" in a way that makes it generate pulses only while the first counter output is in the "high" state.]
I'm not near an LV PC now, but will try to whip up a quick example or two for you soon. I understand how it can be hard to figure out where to get started when you're new to data acq.
-Kevin P.
03-12-2007 05:13 PM
03-13-2007 09:39 AM - edited 03-13-2007 09:39 AM
Hi Paul,
You can use a pause trigger with the two counter outputs of your E Series board to perform the pulse generation. I’ve attached a screenshot of what the block diagram would look like for this type of application.
You will be using two counters for this – one to generate the high frequency pulses, and a second counter to enable/disable the output by using a pause trigger.
I hope this helps. Please post back if you have further questions.
Ed W.
Applications Engineer
National Instruments
Message Edited by Ed W on 03-13-2007 09:39 AM
03-13-2007 11:55 AM
Just chiming in quickly. I put together a couple examples last night, but they are presently on a thumbdrive halfway across town.
One of them created an otherwise useless AI task solely for the purpose of generating a 500 Hz clock signal that could in turn re-trigger a finite pulsetrain generation task.
The other one is virtually the same as what Ed posted, except for one small but possibly important change. As shown in the screenshot, the upper counter task produces the 4 pulse output burst signal. The lower task is a helper that doesn't send any signals out into the external world.
As drawn, there's a chance that the upper task will immediately start producing continuous 10-microsec period pulses until the lower task gets configured and takes on the duty of regulating it. It all depends on the default state of the pin that the lower task hasn't yet started to control.
What I did was to start the lower task first and then start the upper task. This sequence gives you a small but non-zero probabillity of producing <4 pulses for only the very first burst. It just depends whether the upper task happens to start during the 40 microsec of ON time or the 1960 microsec of OFF time. About once in 50 runs.
A method that should be even more robust would be:
1. Config, start, and stop the 500 Hz task. Do NOT clear the task. This should leave the "pause trigger" pin in the idle state (probably LOW).
2. Config and start the 10 microsec pulse task. Nothing will happen yet because the "pause trigger" is in the state that blocks output.
3. Re-start the 500 Hz task. Now you'll get bursts of 4 pulses having 10 microsec period, repeating every 2 msec (500 Hz). All bursts will have exactly 4 pulses.
I'll post anyway when I get the chance, but I'll probably firsrt modify my example to follow the 3 steps above.
-Kevin P.
03-13-2007 04:59 PM