For starters you should state exactly which error you are getting. Also you don't mention what ADC you are using. In case you are using the NI DAQ, here is a good manual where you may find the solution to your problem: http://www.ee.bgu.ac.il/~adcirlab/Experiments/book/08_Labview/DAQ%20Guide.pdf
I would like to measure the average power and peak power using an Vi of R&S. So far my program can read the average result but the module for reading the peak is not working.
Is this VI supposed to run continuously or run one single iteration at a time?
It is possible that the indicator block is only iterating one time when you click 'Run'. You might try adding a while loop (with a conditional stop terminal) around the entire code. Or you might try the 'Run Continuously' mode of operation and see if the peak indicator value updates in real time.