Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with my output waveform from usb-6215

i am working with the NI USB-6215 for writing the samples with external triggering(function generator,TTL output). i can get the samples i have generated from the matlab but unfortuantely the duration of the output waveform is longer than expected.Also, here i am attaching my labview code as well as the samples i generated. i am new to the labview coding.
thank you.
Download All
0 Kudos
Message 1 of 5
(3,372 Views)
Hi,

I see two obvious problems to correct first:

(1) You aren't extracting the sample clock rate correctly from your text file. If you place an indicator on the wire between the 'Index Array' call and the 'DAQmx Timing' call, you'll see the rate is 5 (and not 100, which appears to be the number you want).

(2) Your dt and sample rate don't agree. If your dt is .005, then you'll need a sample rate of 200Hz to create the waveform you want.

If I misunderstood your intention, please let me know, but I think once you correct these problems, you'll be up and running.
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 5
(3,352 Views)
Hi Joe,

Thank you very much for the reply. I just tried to do the way you said and corrcted the sample rate of the text file and the dt. unfortunately it still giving me the same problem. Do you have any suggestions for this.

thank you

Raja
       
0 Kudos
Message 3 of 5
(3,332 Views)
Hi Raja,

Since you've set up your analog output to be finite, you need to specify how many samples you want to output to override the default 1000 samples. If the input waveform is not 1000 samples long (such as yours), then the device will repeat the contents of the buffer until 1000 samples have been output from the device.

To correct the behavior of your VI, please wire the length of your signal to the 'samples per channel' input of your DAQmx Timing subVI. This programming flow is described in the DAQmx Help file under Common Applications » Generic Programming Flows » Analog Output Programming Flows » Finite Analog Output.

Please let me know if you need further clarification.

Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 4 of 5
(3,312 Views)
Hi Joe,

thank you very much. It's running perfect now.
0 Kudos
Message 5 of 5
(3,291 Views)