04-15-2013 02:52 PM
I am continously outputing a 10 second analog waveform. If I try to update the waveform, the UI becomes non-responsive for ~10 seconds.
Code Fragment:
Debug.Print("Start UpDate " & Now)
outputWriter.BeginWriteMultiSample (False, Data(), AddressOf EndUpdating, outputTask)
Debug.Print("End UpDate " & Now)
End Sub
Sub EndUpdating()
Debug.Print("Finished " & Now)
End Sub
Examining the times from the test code:
BeginWriteMultiSample - Returns immediately
The UI is then non-responsive until the EndUpDating is called, about 9 seconds later.
I have tried running this is its own thread with no change in behavior.
The app works fine with no glitching, but bad behavior with the user interface.
Development system - Visula Studio 2013,
Hardware - USB - 6211
Any insites appreciated.
Thanks
04-16-2013 06:23 PM
Dave88,
It may be useful to post the entire code to this thread. I don't think it is a coincidence that the waveform that you are trying to output is a 10 second waveform and the hang you are experiencing is approximately the same.
You may also try running some example code. Here is the path to an example that sounds similar to what you are trying to do:
relative path: National Instruments\NI-DAQ\Examples\DotNET4.0\Analog Out\Generate Voltage\GenMultVoltUpdates_SWTimed\CS
You can also find these examples under START>>ALL PROGRAMS>>NATIONAL INSTRUMENTS>>NI-DAQ>>Text-Based Code Support>>ANSI-C EXAMPLES