LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom pulse train generation

Hello, I would like to generate a pulse train that has a coulpe cycles from high to low, then remains low for awhile, and repeats the sequence. Here is a little ascii waveform of what I want to do:

_ _ _ _
_| |__| |__| |___________________| |

I'm using LabVIEW 7 and would like to do this with DAQMX. I realize I could achieve this by manipulating the frequency and duty cycle on the fly, however its critical that I have a consistent pulse train and I'm not sure I could achieve that by changing the pulse all the time. Is there some way to pre-build this waveform and then repeat it until I am done?
0 Kudos
Message 1 of 7
(3,635 Views)
What I believe you want to do is a retriggerable pulse train generation (this is assuming the pulse is a consistent frequency/duty cycle when on). There is a DAQmx example called multi-function Ctr Retrigg Pulse Train Generation for AI Sample clock which should give you a good starting point (ignore the AI part of it). You will have to figure out some kind of trigger to restart the sequence. One easy thing to do would be to set a digital line high and use that as your trigger to start the pulse output.
0 Kudos
Message 2 of 7
(3,635 Views)
Hello Dave,

I have attached an example program below which should do almost exactly what you want. Simply connect the output of counter 0 to the gate of counter 1 and then connect a digital trigger signal to PFI0. A pulse train will be generated on the output of counter 1 every time a rising edge is detected on PFI 0.

Let me know if you are not able to get this example working correctly.

Regards,
Bill B.
Message 3 of 7
(3,635 Views)
I guess I should have added that I'm using an E-series pci card (no PXI) with a BNC-2110 breakout box. I'll have to plead ignorance as to how to connect these signals, is this a software routing? Thanks for the help.
0 Kudos
Message 4 of 7
(3,635 Views)
actually the card is a PCI-MIO 16E-1. On a PXI-6025E that we have, I see that there are hardware connections for all the aforementioned signals. I don't think the gates are available on the 16E-1 combined with the BNC-2110. So is such a trigger possible with my setup or should I be using some other hardware such as the 6025E?
0 Kudos
Message 5 of 7
(3,635 Views)
Dave...there shouldn't be any reason why you couldn't do this with the 16E-1 adn the BNC-2110. On the 2110 there is a BNC for counter0 output. You need to wire this into User1 BNC and wire that to PFI4 which is the gate of counter1. Then you can wire your trigger into PFI0 which is also a BNC connection on the 2110.
Make sure to check your device documentation to make sure the PFI lines are correct.

Stuart Gillen
0 Kudos
Message 6 of 7
(3,635 Views)
Dave,

Here are links to the user manuals for the PCI-MIO-16E-1 and the BNC-2110. These manuals should help you understand the signal connections a little better:

http://digital.ni.com/manuals.nsf/websearch/06F1C9FB0D0BA5C286256C010057461B?OpenDocument&node=132100_US
http://digital.ni.com/manuals.nsf/websearch/7A862014CCE0CA0486256D3B005CE8DE?OpenDocument&node=132100_US


Regards,
Bill B.
Message 7 of 7
(3,635 Views)