From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

With Continuous Analog Output, when updating output, UI hangs until completely updated

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

 

 

0 Kudos
Message 1 of 2
(2,727 Views)

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

Robert B
RF Product Support Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,700 Views)