LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital Output on Falling Edge of Pulse Train

I have a pulse train running, and I want to output a specific data bit from an array on every rising edge of the pulse train. How can I do that? I'm very new to LabView, so pardon any ignorance. I'm using a BNC-2090 system, and I have the pulse train outputting on CTR0OUT, and I currently have the digital data coming out of DIO 4. Thanks for any help.
0 Kudos
Message 1 of 4
(2,976 Views)
Anyone have anything on this?
0 Kudos
Message 2 of 4
(2,976 Views)
I'm supposing you have an E-series MIO board attached to your BNC-2090, right? I'm also supposing that you want to put these bits out at a very regular rate, using hardware timing from a constant frequency pulse train.

If so, then I think you're going to have to "fake it." The E-series boards can't generate hardware-timed digital patterns. However, you may be able to use an analog output channel to simulate a discrete 0 or 5 Volt level. Hopefully your MIO board has analog outputs on it...

The basic task is to generate an analog waveform using an external clock. The pulse train will *be* that clock. Examples to get you fairly close can be found in LV or on this website. Try some out

You then just create an analog buffer with a voltage v
alue of 0.0 for each "off" bit and 5.0 for each "on" bit. Using analog output allows you to output your "bits" with hardware-timed precision.

-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 4
(2,976 Views)
Hi rajivgiri,

Thank you for contacting National Instruments.

Kevin beat me to the punch on this response, and he is correct. You are not going to be able to perform clocked digital input and output with your card. I say this because you mentioned that you are using a counter for pulse train generation. We only have two cards that can do clocked DIO (the 6533 and the 6534), and neither one of these cards have counters.

The solution is to do exactly what Kevin described. I modified one of our shipping examples to illustrate this. Simply wire your pulse train into one of your PFI lines, and specify that PFI line as the external clock source. The array that I am writing in my example would be the bit array that you refer to. In this case, a 0 wou
ld represent a binary 0, and a 5 would represent a binary 1.

I hope this helps!

Matthew C
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,976 Views)