LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to accurately output a digital signal?

Hello,

 

I am attempting to create a program that basically reads in properties from a TDMS file and uses them to generate a digital output signal of a series of pulse trains with delays in between a specific number of pulses and then acquire acquire the same signal and save the signal in a TDMS file.

 

 

Anyway, the main thing I am asking about is the frequency of pulses in the pulse train. When I set to the frequency, the TDMS file that is created from my program does not have pulses that match the frequency I have set. I will set the frequency to 2 Hz and the frequency of the pulses will appear to be around 1.3 Hz. I have graphs connected to the wave I am attempting to create before it is passed to the DAQmx Write.vi and it reflects the values I send in, which leads me to believe that the problem either lies in the generation or the acquisition of the signal.

 

I have included my files with control values already put into place (instead of having properties read in from a separate TDMS file). Is there a problem with how I have anything set up (in the loop or whatnot), or is there something about the generation and acquisition that adds a delay?

 

Thank you for any help, and let me know if there is any additional information I can give.

 

0 Kudos
Message 1 of 2
(2,166 Views)

Hi katho,

 

It looks like the reason you are not quite seeing the frequency you want is because it seems that you have your digital generation is software timed.  Your code is writing the points generated to the hardware as quickly as the software will execute.  My suggestion would be to take a look at the example codes for generating the digital pulses.  You can see this in the example finder under Hardware Input and Output -> DAQmx -> Digital Generation.  I hope these help you out!

Cole R.
National Instruments
Software Engineer
0 Kudos
Message 2 of 2
(2,124 Views)