I have heard of this error occuring in applications which try to output from one channel while either acquiring or outputting on another channel.
Click here for more information. The task IDs can get mismatched and cause this error.
However, it sounds like you are only generating output from one channel. From your posting, it appeared as though you may be calling AO Start within your while loop? If so, this would cause some sort of problem. You only want to call AO Start once. The AO Write VI will be placed in the while loop. Check on this and then let us know what you find.
J.R. Allen