Hello.
Perhaps the attached VI can give you some idea of how to achieve what you need. The VI is a modified version of the Continuous Acquisition with internal clock example that ships with LabVIEW.
You have to enter the channels from which you want to acquire. For example, if you want to acquire from channels 0 and 1, you must enter "Dev1/ai0,Dev1/ai1".
The sampling rate is set to 1000 samples per second, and the number of samples to read is set to 100 samples, which means that the loop will iterate every 100ms, and each time it executes, you will get 100 samples from each channel.
The first channel is analised to get the maximum value of those 100 samples, and compared against a trigger level. If the channel contained a measurement higher than the trigger level, then the average of 100 samples from the second channel is obtained, and the front panel indicator updated.
You must be aware that the 100 samples averaged correspond to the same time period as the 100 samples that contained the high voltage that triggered the averaging. If you require the average to be of the subsequent 100 samples, or of the previous 100 samples, then the VI must be slightly modified.
Hope this helps. Good luck.
Alejandro