Just an update for anyone else who happens to read this thread, I've run my program almost continuously over the past couple of days and so far I haven't had any errors. I think turning off USB selective suspend in my Windows 7 power settings might have done the trick. I also modified my code so that unchanged settings weren't being rewritten to the oscilloscope so often. Measurements now take about half as long as they did before, which is great.
Thanks a bunch for your help guys!