08-03-2005 06:23 AM
this
.KraftT = new Task(""); this.KraftT.AIChannels.CreateVoltageChannel("Dev1/ai0,Dev1/ai2,Dev1/ai3","",AITerminalConfiguration.Differential,0,10.0, AIVoltageUnits.Volts);this.KraftT.Stream.ReadOverwriteMode = ReadOverwriteMode.OverwriteUnreadSamples; this.KraftT.Timing.ConfigureSampleClock("",this.konfig.abtastfrequenz_kraft,SampleClockActiveEdge.Rising,
SampleQuantityMode.ContinuousSamples);
this.KraftC = new AnalogSingleChannelReader(this.KraftT.Stream);
Is this correct? So the only question now is: how can I access just ai0 ?
Before, I tried with one channel, and I made my access in this kind:
But now, I want to access just a specific channel, like ai0, with which statement is this possible? How can I access to channels?
Do I have always to start and stop the task ?
Please help me, because in the Measurement help of dotNET, I am not able to find anything out!
Are there any manuals for programming in Visual Studio .NET together with the national instruments libraries available?
Yours, Klaus
08-03-2005 09:34 AM
08-04-2005 12:18 AM
Great!
Thanks a lot!
The only problem I now have is, that If I start and stop the task, and than try again to start the task and read data, that I don't get any data in the 2dimension array!
I try to get the 2dimension array in this kind:
this
.KraftC = new AnalogMultiChannelReader(this.KraftT.Stream);Always, when I try a second time to Start and Stop the task, there is no data from Reading the Multi Sample!
Please reply soon!
Thanks, Klaus1
08-04-2005 12:57 AM
i found my mistake:
it was the AvailableSamplesPerChannel, which caused problems! Now I take 10 Samples and everything is OK! 🙂
Yours, Klaus
08-04-2005 03:22 AM
08-05-2005 09:12 AM
08-05-2005 11:32 AM
08-06-2005 08:33 AM
08-08-2005 12:48 AM
this
.AiT.Stream.ReadOffset=-1; this.AiT.Stream.ReadRelativeTo = ReadRelativeTo.MostRecentSample;The main problem is now that the function
double [,] measures = this.AiC.ReadMultiSample(10);
needs at least 100ms !!
Why that?
I configured:
SampleQuantityMode.ContinuousSamples,10);
Yours, Klaus
08-08-2005 09:55 AM