LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Task timeout in VI but not in MAX

I am reading 21 analog signals from a 6225 DAQmx and I also want to read 2 frequencies. I am using the two counter inputs for this. I have gathered all DAQmx reading in one VI and created (in MAX) one task for the analog channels and two tasks for the two frequencies. I have separated the three readings in a secuence structure, first a read the analog signals and then the first frecuency and the the second.
My problem is that I get a timeout error from one of the frecuency readings as if no signal were connected but when I test the same task in MAX it works fine. I am uncertain on how to use Start Task and Stop Task or Clean Task but I believe that I should use Start Task and Clean Task. For the reading I have configured DAQmx Read to Counter DBL 1Samp.
What can I have done wrong?
 
I've attached the VI.
0 Kudos
Message 1 of 4
(2,329 Views)
Your vi was not attached. Please try again.
0 Kudos
Message 2 of 4
(2,316 Views)
Sorry, I''ll try again.Smiley Happy
0 Kudos
Message 3 of 4
(2,305 Views)

Hello!

 

I looked at your VI and the main problem with it is that you don’t control the order in which the program will execute. As it is now in the program you have uploaded there is nothing that controls in which order the control tasks will execute. Insert ‘DAQmx Stop Task.vi’ before each ‘DAQmx Clear Task.vi’ and if you want to achieve sequential behavior use the error cluster to control the order. Just wire the error cluster the upper code snippet that handles the analog input to the middle code snippet where you handle one of the counter parts and so on.

 

Hope this will help!

 

Regards,

Jimmie A.

Applications Engineer, National Instruments

Regards,
Jimmie Adolph
Systems Engineering Manager, National Instruments Northern European Region

0 Kudos
Message 4 of 4
(2,285 Views)