Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

digital train pulse using DAQ 6501

Good evening.
 
I have a NI USB DAQ 6501 (24 digital I/O and 1 counter) and am trying to generate a 1KHz (or higher) pulse train  (Amplitude: 5v-0v), the user is to select which of the 23 outputs available are to be active and determine the state (high or low) for the 24th output. The problem I have is that although the program works fairly well, the pulse train I generate hasn't got a stable pulse width. That is, I get different widths in the pulses and I need a fixed width and frequency for the signal. Here is the VI I made. I have also considered using the counter, but the problem is, I can't use that output, since I need it for the 24th boolean control.
 
I don't know why this is happening and I also wonder if using Real Time may fix the problem?
 
Note: *I have also tried this program with a NI USB DAQ 6229 I borrowed and the output is the same. So I'm assuming the problem is in the VI.
 
Thanks,
Ali
0 Kudos
Message 1 of 2
(2,973 Views)

The 6501 is software timed and you cannot expect reliable timing. Using real time may help but since the 6229 does have hardware timed I/O, that should work if you change the VI to use the clock on that board and not use the 1Samp mode.

p.s. You really need to spend some time studying arrays in LabVIEW. Indexing out each element and then using a build array to recreate the same array is just plain silly.

0 Kudos
Message 2 of 2
(2,971 Views)