12-06-2012 03:17 PM - edited 12-06-2012 03:24 PM
Two problems, I've googled for hours and can't find a solution for. Seems like nobody is doing multi-channel with C#!
1. Compile error:
double[,] data=new double[2,1];
data[0,0]=2.5 + .75 * 5 * (bx);
data[1,0]=2.5 + .75 * 5 * (by);
daq_writer.WriteMultiSample(false, data);
Error is:
Error 1 The best overloaded method match for 'NationalInstruments.DAQmx.AnalogSingleChannelWriter.WriteMultiSample(bool, double[])' has some invalid arguments C:\Documents and Settings\acolaco\My Documents\Visual Studio 2010\Projects\rasterscan\rasterscan\Form1.cs 103 9 rasterscan
Error 2 Argument 2: cannot convert from 'double[*,*]' to 'double[]' C:\Documents and Settings\acolaco\My Documents\Visual Studio 2010\Projects\rasterscan\rasterscan\Form1.cs 103 44 rasterscan
What to do?
2. Runtime error:
daq_task.AOChannels.CreateVoltageChannel("Dev1/ao0:1", "",0,5, AOVoltageUnits.Volts);
daq_task.Timing.ConfigureSampleClock("", 1000, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
Error is:
Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: NationalInstruments.DAQmx.Timing.SampleTimingType
Requested Value: NationalInstruments.DAQmx.SampleTimingType.SampleClock
You Can Select: NationalInstruments.DAQmx.SampleTimingType.OnDemand
Task Name: _unnamedTask<0>
Status Code: -200077
What to do?
Thanks!
12-07-2012 05:12 PM
Hi lebusishu,
Are you using a custom scale? This KB talks about error -200077, which can occur when using custom scales.