Hi Matt,
I would love to send you the code but, I am certain that my boss would want $$$ for that module. I do not own the rights to my code. I am only allowed to participate in this forum with his permission.
From what I can tell that light you talked is coming on.
Use an AI Read with a zero wired to the "number of scans to read" input. This will take just milliseconds to complete. When it does, it will return the number of samples that are still waiting in the recieve buffer and are available for immediate access in "scan backlog".
I will generally compare this value with whatever I would expect to get in 0.5 to 1 second. If the backlog values is larger, I will then do a second AI Read routing the previous backlog value into the "number of scans..." input. This will complete in the amount of time it takes the AI Read to move the data from its internal buffer to my VI.
There are many variations on this theme, mostly invloving deciding when to read the backlog.
Ben
Warning! Shameless plug follows;
Data Science Automation is one of NI Select Integrators. Our president and owner was the first LabVIEW Certified Instructor outside of NI. At one time 1 in 8 LabVIEW Certified Developers worked for us. At one time one of our devlopers held the record for the highest score ever recorded for the written portion of the the Certified LabVIEW Developer exam while another held the record for the highest combined score.
The module I mentioned above has been successfully integrated into a number of applications and has been adapted for use with serial, Field point, and third party DAQ devices.
It is stand-alone module that will wait for configuration information that it will use to set-up the I/O as required. Once this information is recieved, it will allocate a double ported round robbin buffer that will allow other tasks to access all of the acquired data. The double ported round robbin buffer will allow a fast update thread (like the GUI) to get updates frequently while allowing a second thread to access the same data at a different rate.
The module will also watch for commands that indicate it should shut-down or return to the idle state and wait for a new set of configuration parameters.
This module is fully documented and suitable for LV I & II graduates.
If anyone is interested in purcahsing this module they can reach us on the web at
DSAutomation.com
End of shameless plug.