Be sure to properly "Stop" each Background Scan


When using our Universal Library (UL), you are likely to want to take advantage of its background scanning capability.  A background scan, as opposed to a foreground scan, allows your program to perform other tasks (such as process incoming DAQ data) while the UL manages the flow of additional DAQ data behind the scenes.   However, even if a background scan finishes on its own (reaches its sample count), you must still call StopBackground to properly clean up the resources.  Not calling StopBackground can result in your program hanging, or other unreliable operation.

If you are immediately going to start another background scan, it is recommended that you also call GetStatus beforehand to insure that the scan's status = 0 (i.e. that the previous background scan has been fully stopped).

This FAQ applies to the following UL scanning functions:

AInScan
AOutScan 
DInScan 
DOutScan 
CInScan 
DaqInScan 
DaqOutScan 

Posted 3/17/2015 4:53:09 AM by Brent
https://kb.mccdaq.com/KnowledgebaseArticle50578.aspx