Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

counter stops vi from working

Hello,

 

I’m using a ni USB 6215 with labview 8.2, the problem i have is related to counters. I’m using two counters to measure two different shaft speeds as well as 3 analogue inputs. The problem i found was when the shaft is not turning or turning very slow that the vi does not take any readings.

It basically freezes until the shaft start running.

If I do not wire a time out value to the DAQ this error occures.

Fehler -200284 ist bei DAQmx Read (Counter 1D DBL 1Chan NSamp).vi:1 aufgetreten

How can i runn the vi constantly even when the safts are not turning


Can somebody help me with this problem?

Thank you for your help in advance

 

Regards

Fred

0 Kudos
Message 1 of 5
(3,266 Views)
Hello Fred,

do you use the DAQ Assistant Express VI for data acquisition?

Could you post your VI so I can take a look at it and maybe reproduce the problem?

Thank you,

Johannes

NI Germany   626454
0 Kudos
Message 2 of 5
(3,256 Views)

Hello Johannes,

I was told to use multithreading to cope with this problem but this does not work ether.

 

Thanks for your help in advance

 

Regards,

Philipp

0 Kudos
Message 3 of 5
(3,250 Views)
Hello Philipp,

you have configured the DAQ Assistant to acquire 4 samples. In the case of a counter, that means it waits for 4 edges. If those 4 edges don't occur in the timeout period (10 seconds by default), an error is generated which then aborts your VI.

Multithreading indeed is a possibility if you want to continously measure the analog channels, even if the shafts are not turning.

You would have to move the data aqcuisition for the counters in a second loop that is not connected to the first loop by any wires, so that it can run in parallel.
Then wire a timeout value of -1 to both DAQ Assistants, which disables the timeout and makes them wait forever for any edges.

That way, the first loop with the analog data acquisition should be executed continously and display the acquired data, while the second loop only is executed when the shafts turn.

Please refer to the following links for more information about parallel loops in LabVIEW:

http://zone.ni.com/devzone/cda/epd/p/id/3717
http://digital.ni.com/public.nsf/allkb/267704CDE91156D186256F6D00711AAE?OpenDocument

Regards,

Johannes

NI Germany
0 Kudos
Message 4 of 5
(3,243 Views)

Hello Johannes,

 

Thank you this part works now. Since I’m using Multithreading I have now two saved files that have sections of the data, is there a way that I can use one clock to be able to put the data sets together in the way they occurred and also fill the gaps when the shaft does not turn with zeros. Or is it possible to write the data into a matrix and after the acquisition to save them in one file so that they match in the way they occurred and fill the gaps with zeros.

Does it make more sense to use a producer and a consumer setup to take and advantage of the dual core processor in my laptop I’m using?

 

Thanks for your help.

Regards,

Fred

0 Kudos
Message 5 of 5
(3,220 Views)