08-21-2009 09:12 AM
Hello,
I am using PXI-8106 microcontroller with PXI-6289 DAQs on PXI 1042 chassis. I am acquiring continuously from the DAQ , say 5Khz. I have a timed loop which reads the data acquired every 0.1 seconds (500 samples per read). I would like to know if for some reason the loop finishes late, is there any way that I can skip the next samples so that my acquisition and analysis are always synchronised.
Thanks,
kartik
08-24-2009 11:10 AM
My first suggestion would be to use a real time system to ensure that the issue never even occurs. If that is not possible you will have to figure out how long the loop takes to run, maybe with two get system time VI's, one at the beggening and one at the end of your loop, from these you can take the time that your loop took to execute. If this time is over 0.1 seconds you can just dismiss the data that you have already read in with a case structure.
Perhaps a producer consumer style architecture could help you as wel, ensuring that your analysis does not bog down your data acquisition loop and letting your computer use its multicoring more efficiently.
08-25-2009 07:50 AM
Hello Doug,
Thanks for the information. I have a question regarding the "DAQmx Read" property node. Can I use this node to specify the position at which I would like to read from the buffer? Can I use "Relative to" property node to specify the position?
Thanks,
kartik
08-26-2009 12:58 PM
Kartik,
You are correct, this will specify the position in the buffer at which to read from. There is a lot more information available in the LabVIEW help about it as well as how to use it. Just so you're aware the context help feature of labVIEW is immensely useful for answering questions like this and can be turned on by going to Help»Show Context Help and hovering over the property node.