LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating a tri state waveform pattern and writing into DAQ card

Hi,

 

I am using LV8.0 and NI-6259 DAQ card.

 

I want to generate a waveform pattern which initially goes to +5v and goes to 0v and then again goes to -5v

and finally goes to 0v. 

 

I have used the waveform pattern generator and have generated 4 kinds of waveform with some particular samples

and I will be appending all the 4 waveform patterns(+5, 0, -5, 0) and the appended waveform will be written into DAQ card.

 

The problem is:

    When I probe CRO at the Analog output pin of the DAQ card, the pin level will be always at +5v and sometimes

    it goes to 0 and back to +5v. But I am expecting a waveform with 3 voltage levels i.e.., +5( some 100 samples), 0v(for some 1000 samples.

    -5v(same as +5v) and 0v( 2000 samples). 

 

How to get this kind of waveforms in NI-6259 DAQ(M Series) card.

 

Please find the attached VI which I have created.

 

Letme know the loophole in the VI and correct way of generating a tristate waveform.

 

Thanx in advance, 

 Yogesh

    

0 Kudos
Message 1 of 4
(2,849 Views)

Hello YogeshaYS,

 

Thanks for your post!

 

I see that you are wanting to output a waveform that goes from 5 to 0 to -5 and then back to 0. It looks like from your code that you want to do this in a continuous fashion? If this is so you will need a while loop to output the waveform. Take a look at one of our shipping examples that shows how to do analog output waveform. Go to Help >> Find Examples. When here go to Hardware Input and Output >>  DAQmx >> Voltage >> Cont Gen Voltage Wfm-Int Clk.vi. Your VI works great but it only does the output once so that may be why you see some interesting results on your output. Let me know if any of this information helps you with your program. I was able to run it in a continuous mode and see the voltage levels go from 5 to 0 to -5 just like you were wanting. Have a great day YogeshaYS and please reply if you have any other questions on this. 

 

Cheers!

 

Corby_B

http://www.ni.com/support 

Message 2 of 4
(2,817 Views)

Hi Corby_B,

 

I am very happy and i am effulgent with joy. Yes, according to you, the missing thing was the while loop.

May be the output was coming more quondom. Since it was generating only once, i was not able to capture the same

on CRO.

Though it was a airheaded mistake, was a major one.

Will get back to you with some more probs(major issues).

 

Thanks,

Yogesh

 

0 Kudos
Message 3 of 4
(2,782 Views)

Hello YogeshaYS,

 

Glad to hear that the information I sent you helped out! Yes, please do respond if you have any other problems with your DAQ application.

 

Cheers!

 

Corby_B

http://www.ni.com/support 

0 Kudos
Message 4 of 4
(2,765 Views)