Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Three finite outputs using 6602

Hi,
     I'm developing an application that will generate three outputs for a finite time using a NI 6602. One signal will have a given frequency and the two remaining signals will have a frequency that is half of the first but with a user defined delay.  I was able to get it working using an example I found with a continuous output. However when I try to generate a finite output it either times out without finishing the signal generation (using ctr0, ctr2, ctr4) or says that I cannot perform the desired process becuase the task is reserved. (error -50103). I also tried using a continous generation with a separate counter to count the edges of the master signal to determine when to finish. I was unable to get this to work however in both a internal routing and physical routing setting. I'm at a loss as how to  fix this problem. I've attached a sample of my code and any thoughts/hints/suggestions are greatly appreciated. Perhaps I'm overlooking something more basic.

Thanks,
             Dave
0 Kudos
Message 1 of 3
(3,404 Views)

Hello,

 

I have a similar problem using two 6602 for counting 2 inputs each.

The first two are counted correctly, but then error -50103 appears.

Any idea?

I'm programming in CVI with DAQmx and I have 4 different tasks for the counters...

 

Regards, Mike

0 Kudos
Message 2 of 3
(3,333 Views)
Mike,
         I solved my problem by having two separate tasks. The first was the master timebase at 1000Hz. The second task was two separate 500Hz signals that rose high with a given delay offset. The second task is simply triggered from the first by setting the trigger input to be the internal output of the master signal. Separating the two separate tasks simplified my issue. I not sure if that helps you at all. It seems as if your error is coming from somewhere else.

Dave
0 Kudos
Message 3 of 3
(3,265 Views)