Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter-Input-Period-Triggered Analog Input Voltage -- Why it is Ramp Waves instead of Square Waves

Hello, Guys/Girls,

 

I am making an program to acquire both a counter-input-period signal and an analog input voltage sImUlTaNeOuSlY. The input signals are:

 

counter input period: 0-5 volts pulses with varying frequencies

analog input voltage: 1-3 volts analog voltage

 

My vi is supposed to be such that the analog input voltage acquisition is supposed to be triggered by the first falling edge of pulses, then acquire data at a specified sampling rate like 10kHz. At the same time, the counter input period is acquiring specified number of pulses as well.

 

For now I am feeding a 0-5 volts, 1kHz square waves to both the Dev3/counter1(PFI4) and Dev3/ai7, so that I should have a square wave displayed on my waveform graph. But I see ramp instead square.

 

Hardware/Software: NI USB-6216, Window 7, Labview 2009 and DAQmx

 

Any suggestion/comments are greatly appreciated! Thanks a lot!

 

 

 

0 Kudos
Message 1 of 3
(3,045 Views)

BTW, Guys and Girls, I also got error messages. A front panel and block diagram of the "Simple Error Handler.vi" just popped up. No idea what it does/means. Would you let me know how you think about it please?

0 Kudos
Message 2 of 3
(3,043 Views)

Looking at the front panel of your VI, it seems the sampling rate is 1kHz which is the same as your signal.  I recommend trying 10kHz for a more accurate representation of the signal.  It may also be beneficial to ensure each process is working as expected before combining the two.  The DAQmx examples are always a good starting point.  Testing each process seperately eliminates the influence of something from the other code.  If you are experiencing errors, please post them to provide insight into the issue.  Here are some useful tools to use when debugging.  Context Help is useful for a small description and a link the the detailed help information for unknown VIs.

Regards,


h_baker
National Instruments
Applications Engineer
0 Kudos
Message 3 of 3
(3,000 Views)