Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Output of various waveforms in Visual Basic

I have created random "noise" waveforms in Visual Basic and have displayed them to the CWGraph with no problems. However, I am unclear on how to output this waveform using the CWAO activex control. I have looked at the example code, but they only deal with "fixed" frequency waveforms and I don't have that type of waveform. I have the time and voltage values in an array, but how do I send each voltage point at the proper time interval? I've tried to setup the internalclock.period to the first value in the time array then set the progress interval to 1 so I can grab the next time point...but get nothing but errors. I thought of using the CWAOPoint activex control but timing is critical (need 1 msec resolution). I see
no example code for this. Can anyone help or point me in the right direction? You responses are very much appreciated
0 Kudos
Message 1 of 3
(3,294 Views)
Hello;

I'm not completely sure about your application, but assuming you need to change the waveform on the fly, you can accomplish that by changing one of the shipping examples.

You can actually, change the array that is going to be written to the analog output channel inside the while loop that makes the analog output task continuous.

Hope this helps.
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,294 Views)
I was referencing the AO example located in the "c:\program files\national instruments\measurementstudio\vb\samples\daq\_gettingstarted\ao" directory. This example simply loads a 1-D array with voltage values and outputs them via the analog output at a given frequency. So the program services the buffer at a fixed time. I on the other hand have a 2-D array that has both time and voltage levels that need to be ouput on the analog channel. The output time intervals are the individual array items and are different for each voltage point. So I need to somehow send the first voltage point and wait the next time value in the array then send the next voltage point....so on and so forth. All examples provided by NI do not show this type of waveform generation.
Hope this helps explain my application.

Scott
0 Kudos
Message 3 of 3
(3,294 Views)