04-22-2007 10:57 AM
Hello,
I am using PCI 6723 for generation of Analog Outputs using VB.NET 2003. I am not able to generate multiple analog outputs simultaneously. I tried to modify code as provided in example (..\NI-DAQ\Examples\DotNET1.1\Analog Out\Generate Voltage, ContGenVoltageWfm_IntClk). I changed the AnalogSingleChannelWriter to AnalogMultiChannelWriter and instead of one dimensional array I supply two dimensional array. I got the output but the channel aO and a1 doesnot show up at same time (time difference, not simultaneously). Is this a right way of generating output?
I am also looking for example code that is compatible with VB.NET 2003 regarding multiple analog outputs.
Any programming manual regarding VB.NET (command and their operations) would be helpful.
With regards,
04-23-2007 07:05 PM
04-25-2007 06:15 PM
Hello Matt,
Thank you for your response.
I am not able to generate analog outputs signals simultaneously for different channels with different data.
If, array(0,i) = 100 random numbers
array (1,I )= 100 random numbers
array(2,i)= 100 random numbers
Dim writer As New AnalogMultiChannelWriter(myTask.Stream)
writer.WriteMultiSample(False, array)
It will output 100 random numbers for all 3 channels; but I am not able to update oputput with different data. Do we need to repeat same process ( from the beginning )each time to update output ?
What do you mean when you say: "I got the output but the channel aO and a1 doesnot show up at same time (time difference, not simultaneously)."?
Well, when I created 2 channels, the output point of first channel doesnot appear at same time with second channel. for example,
array (0, 1)=-2
array(1,1) =2
then, isnt it the channel 0 output (-2) and channel1 (2) output should apper at the same time?
With regards,
Bryan
04-26-2007 11:19 AM
04-26-2007 06:29 PM
Hello Matt,
Thanks for your valuable response.
One last question, instead of contineous samples I want to have fintie samples.
I changed my configureSampleClock as shown below.
myTask.Timing.ConfigureSampleClock("", 5000, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 5000)
I want to clear all the previous samples (clear buffer) while writing new samples onto it simeltaneously. I tried different ways but
getting same error code: -200288 ( Property : NationalInstruements.DAQmx.Daqstream.WriteRelativeTo Corresponding Value: NationalInstruemnts.DaQmx.WriteRelativeTo.CurrentWritePosition .
Property :NI.DAQmx.DAQsteam.writeOffset Corresponding value.
How can we point the write position (buffer location)? Any Vb.Net 2003 example will be too helpful.
About delay, it was my mistake, sorry for that.
With regards,
Bryan
04-26-2007 11:06 PM
@bryan81 wrote:...
I want to clear all the previous samples (clear buffer) while writing new samples onto it simeltaneously.
...