Look at the vi attached. It performs these operations:
- Continuously acquire with AI 1 scan
- When a boolean is true accumulate readings in an array
- When the same boolean becomes false calculates and displays mean and reset the array for a new accumulation
You should consider to modify your actual vi by disassembling Acquire 1 scan in order to avoid the continuous confguration of the DAQ device: move AI Config outside the loop and AI Single Scan inside it.
This should solve you problem, if not replay to this message with some detail more or e-mail me.
Roberto