How Can I Perform an Asynchronous Analog Input Operation in LabVIEW?Primary Software: LabVIEW Development Systems>>Full Development SystemPrimary Software Version: 6.0 Primary Software Fixed Version: N/A Secondary Software: Driver Software>>NI-DAQ, Driver Software>>NI-DSA Hardware: Modular Instruments>>Dynamic Signal Acquisition and Analysis (DSA), Multifunction DAQ (MIO)>>E Series, Multifunction DAQ (MIO)>>S Series
Problem: I am performing an analog input operation with an DAQ card in LabVIEW. I have noticed that the Analog Input Read will "hang" the computer until either all the data I have requested becomes available or until a timeout condition occurs. During this waiting period, the processor usage display in the Task Manager increases to 100% (on a single processor system). If I have other processes running in parallel, including other data acquisition operations or additional applications, these processes do not run as quickly as I would like. Solution: AI Read.vi executes "synchronously." If AI Read is called before the requested number of points is available, it will execute a very tight internal loop, polling the backlog constantly until the requested number of points becomes available. This tight loop leaves little or no processor bandwidth for other processes. A solution is to bring this "backlog polling" into the LabVIEW layer rather than to rely on AI Read to execute it within the NI-DAQ DLL. This allows the loop to be executed more "loosely," allowing other processes to obtain more processor bandwidth. The subVI called "Asynchronous AI Read" (a subVI in the example linked below) provides a drop-in replacement for the ordinary AI Read that uses this technique to execute asynchronously. This Example Program link below provides an illustration of how to use the Asynchronous AI Read.vi when performing two independent DAQ operations in parallel while loops. Related Links: Developer Zone Example: Asynchronous Parallel DAQ Operations in LabVIEW KnowledgeBase 28JEUR2L: Windows 2000 CPU Usage Is 100% for My VI Attachments:
Report Date: 06/10/2003 Last Updated: 05/01/2007 Document ID: 2Y9GO82L |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
