ayed over and over(same waveform), while input reads unbuffered(uses AI Acquire Waveform). The output sometimes doesnt start, or stops during output. Seems to be totally random... Input works fine. Does anyone have an explanation or tip about this problem?Hello,
The most probable reason why this is happening is, Analog Input Reading is a synchronous operation which once started does not give chance to other process until it reads the required amount of data that you have asked it to read during a go. So while doing simultaneous AI and AO, it is not a good idea to use AI Acquire Waveform type of VIs. And also it not a good idea to use those VIs that do continuous AI by using AI Read simply in a while loop.
The best is to do Analog Input using DAQ Occurrences. The advantage of using DAQ occurrences is, using it you can say, call my AI Read only when the amount that I have asked it to read are acquired. This prevents the AI Read to wait. I hope what I am saying is clear.
To best understand, open the exampl
e "Cont Acq and Chart (Async).vi" under LabVIEW Help>>Find Examples>>Hardware Input Output>>DAQ>>Analog Input. This is an example of doing Analog Input using Occurrences. Try to create a VI that uses this examples features and any Analog Output example's feature and I am sure the problems that you are seeing would go away.
And if they dont, please let me know.
You may also take a look at the following examples link if you have not already done so:
Advanced ProgrammingSincerely,
Sastry V
Applications Engineer
National Instruments.